python
network_error
ai_generated
true
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. (read timeout=15)")'
ID: python/pip-connection-timeout-pypi
80%Fix Rate
88%Confidence
0Evidence
2025-05-09First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.x | active | — | — | — |
Root Cause
Network latency or a slow/blocked connection to files.pythonhosted.org exceeds pip's default read timeout, causing repeated retries and eventual failure.
generic中文
到 files.pythonhosted.org 的网络延迟或连接缓慢/被阻断,超出 pip 默认读取超时,导致反复重试并最终失败。
Workarounds
-
85% success
Increase timeouts and retries: pip install --timeout 120 --retries 10 package
-
90% success
Use a faster mirror: pip install -i https://pypi.tuna.tsinghua.edu.cn/simple package
-
88% success
Configure globally: pip config set global.timeout 120 && pip config set global.index-url https://pypi.org/simple
Dead Ends
Common approaches that don't work:
-
80% fail
The underlying network latency is unchanged; retries hit the same timeout.
-
90% fail
Trusted-host only disables TLS verification; it does not affect read timeouts.
-
85% fail
Removes retries but the first attempt still times out.