python
install_error
ai_generated
true
错误:子进程退出并报错 × python setup.py egg_info 未成功运行。 │ 退出代码:1 ╰─> [8 行输出] Traceback (最近一次调用): File "<string>", 第 2 行, 在 <module> from setuptools import setup ModuleNotFoundError: 没有名为 'setuptools' 的模块
error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [8 lines of output] Traceback (most recent call last): File "<string>", line 2, in <module> from setuptools import setup ModuleNotFoundError: No module named 'setuptools'
ID: python/pip-install-error-command-errored-out-with-exit-status-1
80%修复率
86%置信度
0证据数
2024-09-05首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.x | active | — | — | — |
根因分析
包的构建过程失败,因为构建环境中未安装 setuptools,通常是由于缺少构建依赖。
English
The build process for the package failed because setuptools is not installed in the build environment, often due to a missing build dependency.
解决方案
-
85% 成功率
pip install --upgrade setuptools wheel
-
80% 成功率
pip install setuptools wheel && pip install --no-build-isolation package
-
75% 成功率
python -m pip install --upgrade pip
无效尝试
常见但无效的做法:
-
60% 失败
May not affect isolated build environments used by pip.
-
50% 失败
This can work if setuptools is already installed, but often fails if it's not.
-
90% 失败
The missing dependency persists.