python
network_error
ai_generated
true
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x...>: Failed to establish a new connection: [Errno 111] Connection refused')'
ID: python/pip-extra-index-unreachable
80%Fix Rate
87%Confidence
0Evidence
2024-10-21First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
Root Cause
pip is configured with an extra index URL that is unreachable from the current network, causing retries before falling back.
generic中文
pip 配置了一个在当前网络上无法访问的额外索引 URL,导致在回退前反复重试。
Workarounds
-
90% success
pip config unset global.extra-index-url # or edit ~/.config/pip/pip.conf
-
85% success
pip install --index-url https://pypi.org/simple <package>
Dead Ends
Common approaches that don't work:
-
90% fail
More retries just delay the same connection failure.
-
95% fail
The connection is refused immediately; timeout is not the issue.
-
90% fail
pip itself is fine; the configured index URL is the problem.