# error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.

- **ID:** `python/pip-legacy-setup-py-install-failed`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pip attempts to build a source distribution using the deprecated setup.py egg_info path, but the package's setup.py relies on outdated setuptools APIs or a missing build dependency.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (75% success)
   ```
   pip install --upgrade pip setuptools wheel && pip install --no-cache-dir <package>
   ```
2. **** (65% success)
   ```
   pip install --no-build-isolation --upgrade setuptools && pip install <package>
   ```
3. **** (80% success)
   ```
   pip install --only-binary=:all: <package>
   ```

## Dead Ends

- **** — The legacy resolver only changes dependency resolution, not the build backend; setup.py still fails. (85% fail)
- **** — Editing third-party source inside site-packages breaks package integrity and is overwritten on reinstall. (90% fail)
- **** — Older pip still invokes the same setup.py path and may lack modern PEP 517 fallbacks. (70% fail)
