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

Also available as: JSON · Markdown · 中文
80%Fix Rate
87%Confidence
0Evidence
2024-10-21First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
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

  1. 90% success
    pip config unset global.extra-index-url  # or edit ~/.config/pip/pip.conf
  2. 85% success
    pip install --index-url https://pypi.org/simple <package>

Dead Ends

Common approaches that don't work:

  1. 90% fail

    More retries just delay the same connection failure.

  2. 95% fail

    The connection is refused immediately; timeout is not the issue.

  3. 90% fail

    pip itself is fine; the configured index URL is the problem.