# 错误：选项 --extra-index-url 需要一个参数

- **ID:** `python/pip-option-requires-argument`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

使用了 --extra-index-url 标志但未提供 URL 值。

## 版本兼容性

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

## 解决方案

1. **** (95% 成功率)
   ```
   pip install package --extra-index-url https://private-pypi.example.com/simple
   ```
2. **** (90% 成功率)
   ```
   export PIP_EXTRA_INDEX_URL=https://private-pypi.example.com/simple && pip install package
   ```

## 无效尝试

- **** — Pip will try to use that URL and fail to connect. (80% 失败率)
- **** — The package may not be found without the extra index. (50% 失败率)
