python network_error ai_generated true

错误:异常:Traceback (most recent call last): ... pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): 读取超时。

ERROR: Exception: Traceback (most recent call last): ... pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

ID: python/pip-read-timeout

其他格式: JSON · Markdown 中文 · English
80%修复率
84%置信度
0证据数
2024-05-12首次发现

版本兼容性

版本状态引入弃用备注
3.x active

根因分析

与包索引的网络连接过慢或不稳定,导致 pip 在等待数据时超时。

English

The network connection to the package index is too slow or unstable, causing pip to time out while waiting for data.

generic

解决方案

  1. 85% 成功率
    pip install --timeout 120 package
  2. 90% 成功率
    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple package

无效尝试

常见但无效的做法:

  1. 60% 失败

    If the network issue persists, retrying will result in the same timeout.

  2. 70% 失败

    Does not address network speed; may even worsen by re-downloading.