python
network_error
ai_generated
true
错误:找不到满足需求 package==1.2.3 的版本(可用版本:无) 错误:找不到匹配的分发包
ERROR: Cannot find a version of package that satisfies the requirement package==1.2.3 (from versions: none) ERROR: No matching distribution found for package==1.2.3
ID: python/pip-conflicting-extra-index-url
80%修复率
84%置信度
0证据数
2025-09-12首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.x | active | — | — | — |
根因分析
--extra-index-url 指向不托管所请求包/版本的私有索引,且 pip 不会为该包名回退到 PyPI。
English
An --extra-index-url points to a private index that does not host the requested package/version, and pip does not fall back to PyPI for that name.
解决方案
-
88% 成功率
Use both indexes explicitly: pip install --index-url https://pypi.org/simple --extra-index-url https://private.example.com/simple package
-
85% 成功率
Verify the private index hosts the version: curl -s https://private.example.com/simple/package/ | grep 1.2.3
-
90% 成功率
Publish the missing version to the private index or pin to a version it hosts
无效尝试
常见但无效的做法:
-
90% 失败
Trusted-host only affects TLS verification; the package is simply absent from the index.
-
80% 失败
Replacing the index removes PyPI access entirely, so public deps also fail.
-
95% 失败
The package is not present in the index; retries do not change availability.