# 错误：子进程退出并报错

× python setup.py egg_info 未能成功运行。

- **ID:** `python/pip-legacy-setup-py-install-failed`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

pip 尝试使用已弃用的 setup.py egg_info 路径构建源码分发包，但该包的 setup.py 依赖于过时的 setuptools API 或缺少构建依赖。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## 解决方案

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

## 无效尝试

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