python / python/cpython

installation of 3.10 and 3.11 failed on LINUX in the script "compileall.py"

未关闭
#101,331 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

topic-installation type-bug
主要语言
Python
星标
77.2k
派生
36k
PR 合并指标
PR 指标待抓取

描述

I often installed python but now (for some unknown reason) it failed on LINUX. The problem is the lib/python3.11/compileall.py with 6 sub-fork never end. I stop after 1h30 execution time, I try 3.10 and 3.11.

comment out the block

#       -PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
#               $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
#               -j0 -d $(LIBDEST) -f \
#               -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
#               $(DESTDIR)$(LIBDEST)
#       -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
#               $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
#               -j0 -d $(LIBDEST) -f \
#               -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
#               $(DESTDIR)$(LIBDEST)
#       -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
#               $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
#               -j0 -d $(LIBDEST) -f \
#               -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
#               $(DESTDIR)$(LIBDEST)
#       -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
#               $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
#               -j0 -d $(LIBDEST)/site-packages -f \
#               -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
#       -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
#               $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
#               -j0 -d $(LIBDEST)/site-packages -f \
#               -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
#       -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
#               $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
#               -j0 -d $(LIBDEST)/site-packages -f \
#               -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages

helps to install, but the python seems to be broken with startup error on missing parts like.

exec: [1] ;.../bin/python3.11
Could not find platform dependent libraries <exec_prefix>
Python 3.11.1 (main, Jan 25 2023, 23:48:02) [GCC 11.3.1 20221024 [revision bd0c76a2329e7fe6d6612c2259647bbb67f5866a]] on linux
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
  File "/etc/pythonstart", line 7, in <module>
    import readline
ModuleNotFoundError: No module named 'readline'
>>> 

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 lib/python3.11/compileall.py 以及 Linux 安装期间使用 -j0 调用它的 build-script 代码块开始。重现报告中的 3.10 或 3.11 build,并调查六个子进程为何无法完成。完成的标准是:不注释掉该代码块即可完成安装,并且生成的解释器能够 import readline,且不会出现报告中所述的缺少库导致的启动错误。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
build-system
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。