# 错误：无效的命令 'egg_info'

- **ID:** `python/pip-egg-info-missing-requires`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

setuptools 未安装或版本过旧，导致构建包时 'egg_info' 命令不可用。

## 版本兼容性

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

## 解决方案

1. **Install or upgrade setuptools explicitly** (95% 成功率)
   ```
   pip install --upgrade setuptools
   ```
2. **Use python -m ensurepip to bootstrap** (80% 成功率)
   ```
   python -m ensurepip --upgrade
   ```

## 无效尝试

- **Reinstalling pip using 'pip install --upgrade pip'** — Pip upgrade does not address missing setuptools. (60% 失败率)
- **Manually creating an egg-info directory** — The directory structure is incomplete and doesn't fix the underlying command absence. (80% 失败率)
