python
network_error
ai_generated
true
错误:警告:连接断开后重试(Retry(total=4, connect=None, read=None, redirect=None, status=None)),原因为 'ReadTimeoutError':HTTPSConnectionPool(host='pypi.org', port=443):读取超时。
ERROR: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError': HTTPSConnectionPool(host='pypi.org', port=443): Read timed out.
ID: python/pip-download-timeout
80%修复率
85%置信度
0证据数
2026-01-15首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
网络延迟或服务器缓慢导致 pip 超过默认读取超时。
English
Network latency or server slowness causes pip to exceed the default read timeout.
解决方案
-
90% 成功率 Increase the default timeout using pip's option
pip install --default-timeout=100 mypackage
-
85% 成功率 Use a faster mirror or proxy
pip install -i https://pypi.douban.com/simple mypackage
无效尝试
常见但无效的做法:
-
Reducing the timeout value
80% 失败
A shorter timeout will make the problem worse.
-
Using --no-cache-dir
70% 失败
Caching is not related to network timeout.