python
config_error
ai_generated
true
错误:选项 --extra-index-url 需要一个参数
ERROR: option --extra-index-url requires an argument
ID: python/pip-option-requires-argument
80%修复率
87%置信度
0证据数
2024-09-14首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
使用了 --extra-index-url 标志但未提供 URL 值。
English
The --extra-index-url flag was used without providing a URL value.
解决方案
-
95% 成功率
pip install package --extra-index-url https://private-pypi.example.com/simple
-
90% 成功率
export PIP_EXTRA_INDEX_URL=https://private-pypi.example.com/simple && pip install package
无效尝试
常见但无效的做法:
-
80% 失败
Pip will try to use that URL and fail to connect.
-
50% 失败
The package may not be found without the extra index.