pip network_error ai_generated true

pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='pypi.org', port=443): Read timed out.

ID: pip/timeout

Also available as: JSON · Markdown
88%Fix Rate
90%Confidence
50Evidence
2022-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
24 active

Root Cause

Network timeout during package download from PyPI. Caused by slow connections, network congestion, large packages, or restrictive firewall/proxy settings. The default timeout of 15 seconds is often insufficient.

generic

Workarounds

  1. 88% success Increase timeout: pip install --timeout 120 <package>
    pip install --timeout 120 --retries 5 <package>
  2. 85% success Use a closer PyPI mirror or CDN
    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ <package>  # or other regional mirror
  3. 90% success Download the wheel separately and install from file
    pip download <package> -d ./wheels && pip install --no-index --find-links ./wheels <package>

Dead Ends

Common approaches that don't work:

  1. Simply retry the same command immediately 55% fail

    If the network issue is persistent (slow connection, firewall), retrying without changes will hit the same timeout

  2. Switch to HTTP instead of HTTPS to reduce overhead 95% fail

    PyPI requires HTTPS; HTTP is blocked and also insecure

Error Chain

Leads to:
Preceded by:
Frequently confused with: