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

× python setup.py egg_info 未成功运行。
│ 退出代码：1
╰─> [8 行输出]
    Traceback (最近一次调用)：
      File "<string>", 第 2 行, 在 <module>
        from setuptools import setup
    ModuleNotFoundError: 没有名为 'setuptools' 的模块

- **ID:** `python/pip-install-error-command-errored-out-with-exit-status-1`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

包的构建过程失败，因为构建环境中未安装 setuptools，通常是由于缺少构建依赖。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **** (85% 成功率)
   ```
   pip install --upgrade setuptools wheel
   ```
2. **** (80% 成功率)
   ```
   pip install setuptools wheel && pip install --no-build-isolation package
   ```
3. **** (75% 成功率)
   ```
   python -m pip install --upgrade pip
   ```

## 无效尝试

- **** — May not affect isolated build environments used by pip. (60% 失败率)
- **** — This can work if setuptools is already installed, but often fails if it's not. (50% 失败率)
- **** — The missing dependency persists. (90% 失败率)
