# KeyError: 'egg_info'

- **ID:** `python/setuptools-command-not-found-egg-info`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

setuptools 找不到 'egg_info' 命令，通常是因为包的 setup.py 格式错误或 setuptools 未正确安装。在使用最小化 Python 安装时可能发生。

## 版本兼容性

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

## 解决方案

1. **** (90% 成功率)
   ```
   Ensure setuptools is installed and up to date: pip install --upgrade setuptools.
   ```
2. **** (95% 成功率)
   ```
   Use a virtual environment with a full Python installation: python -m venv venv && source venv/bin/activate && pip install setuptools.
   ```

## 无效尝试

- **** — If egg_info is missing, develop will also fail with the same error. (85% 失败率)
- **** — Reinstalling doesn't fix setuptools installation issues. (80% 失败率)
