python
install_error
ai_generated
true
错误:子进程以错误退出 × python setup.py bdist_wheel 未成功运行。
error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully.
ID: python/pip-subprocess-exited-with-error
80%修复率
87%置信度
0证据数
2024-03-11首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
某个包的构建后端(旧式 setuptools setup.py)在生成 wheel 时崩溃,通常由缺少系统 C 头文件、setuptools 版本不兼容或 Cython/编译器失败引起。
English
A package's build backend (legacy setuptools setup.py) crashed during wheel creation, usually due to missing system C headers, an incompatible setuptools version, or a Cython/compiler failure.
解决方案
-
85% 成功率
Install the needed system build tools first. On Debian/Ubuntu: `sudo apt-get install build-essential python3-dev libffi-dev libssl-dev`. On macOS: `xcode-select --install`. Then retry `pip install <pkg>`.
-
80% 成功率
Prefer a prebuilt wheel: `pip install --only-binary=:all: <pkg>`, or upgrade the build toolchain with `pip install --upgrade pip setuptools wheel` before installing.
-
75% 成功率
Read the full traceback above the error (pip truncates it). Re-run with `pip install -v <pkg>` to see the actual compiler error and address that specific missing dependency.
无效尝试
常见但无效的做法:
-
95% 失败
The build fails deterministically; retrying does not supply the missing compiler or headers.
-
70% 失败
Disabling isolation makes pip use the current environment's setuptools, which may be even older and fail the same way.
-
60% 失败
Older pip still invokes the same broken build backend and loses modern resolver features.