python
install_error
ai_generated
true
error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [12 lines of output]
ID: python/pip-install-error-subprocess-exited-with-error
80%Fix Rate
88%Confidence
0Evidence
2024-03-12First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
Root Cause
pip is trying to build a package from source using the legacy setup.py egg_info path, and the build script fails — usually missing system build dependencies (compilers, headers), a broken setup.py, or incompatible setuptools version.
generic中文
pip 尝试通过旧的 setup.py egg_info 路径从源码构建包,构建脚本失败——通常是缺少系统构建依赖(编译器、头文件)、setup.py 损坏,或 setuptools 版本不兼容。
Workarounds
-
82% success
pip install --only-binary=:all: <package> # or force a wheel for a specific platform pip install <package> --only-binary=:all: --platform manylinux2014_x86_64 --python-version 311 --implementation cp --abi cp311
-
78% success
# Debian/Ubuntu sudo apt-get install -y build-essential python3-dev libffi-dev # macOS xcode-select --install # then pip install --no-build-isolation <package>
-
90% success
pip install -v <package> 2>&1 | tee pip.log grep -A40 'error:' pip.log
Dead Ends
Common approaches that don't work:
-
85% fail
Cache is not the cause; the build subprocess still fails identically because the underlying compiler/header issue remains.
-
60% fail
Upgrading build tools helps only if the failure is due to outdated setuptools; missing C headers or a broken setup.py still fails.