python network_error ai_generated true

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x...>, 'Connection to pypi.org timed out. (connect timeout=15)')'

ID: python/pip-network-timeout

Also available as: JSON · Markdown · 中文
80%Fix Rate
86%Confidence
0Evidence
2024-07-22First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.8 active
3.9 active
3.10 active
3.11 active
3.12 active

Root Cause

The network connection to PyPI is slow or blocked, causing the request to exceed the timeout.

generic

中文

到 PyPI 的网络连接缓慢或被阻止,导致请求超时。

Workarounds

  1. 90% success
    pip install package --index-url https://mirrors.aliyun.com/pypi/simple/
  2. 75% success
    pip install package --timeout 60

Dead Ends

Common approaches that don't work:

  1. 50% fail

    Timeout increase may help temporarily but does not address underlying network issues like firewall or proxy.

  2. 90% fail

    Disabling cache does not affect network connectivity; timeout still occurs.