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.VerifiedHTTPSConnection object>: Failed to establish a new connection: [Errno 111] Connection refused')': /simple/pkg/

ID: python/pip-index-url-connection-error

Also available as: JSON · Markdown · 中文
80%Fix Rate
88%Confidence
0Evidence
2024-04-15First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.6 active
3.7 active
3.8 active
3.9 active

Root Cause

The package index server is unreachable due to network issues, firewall, or server down.

generic

中文

包索引服务器不可达,可能是网络问题、防火墙或服务器宕机。

Workarounds

  1. 80% success
    curl -I https://pypi.org/simple/pkg/
  2. 90% success
    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pkg

Dead Ends

Common approaches that don't work:

  1. 70% fail

    If the server is down, longer timeouts don't help.

  2. 50% fail

    May not be configured correctly.