pip
build_error
ai_generated
true
error: subprocess-exited-with-error: python setup.py egg_info did not run successfully
ID: pip/subprocess-error-setuptools
85%Fix Rate
88%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 24 | active | — | — | — |
Root Cause
Legacy setup.py based install failed. Package may need C compiler, headers, or pyproject.toml migration.
genericWorkarounds
-
90% success Install build dependencies: apt install python3-dev build-essential (for C extensions)
sudo apt install python3-dev build-essential # Debian/Ubuntu brew install python # macOS
-
85% success Check if a newer version has a pre-built wheel: pip install --prefer-binary <pkg>
pip install --prefer-binary
Sources: https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-prefer-binary
-
88% success Install package-specific system deps (e.g., libpq-dev for psycopg2, libxml2-dev for lxml)
e.g., libpq-dev for psycopg2, libxml2-dev for lxml
Dead Ends
Common approaches that don't work:
-
Use --no-build-isolation
55% fail
May fix some cases but can cause dependency conflicts in build env
-
Install from a wheel instead
70% fail
If a wheel exists, pip would already use it — it's building because there's no wheel
Error Chain
Frequently confused with: