python network_error ai_generated true

错误:由于 OSError:HTTPSConnectionPool(host='pypi.org', port=443):读取超时,无法安装包。

ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='pypi.org', port=443): Read timed out.

ID: python/pip-install-error-timeout

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

版本兼容性

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

根因分析

网络连接问题或与 PyPI 的连接速度过慢导致读取操作超时。

English

Network connectivity issues or a slow connection to PyPI caused the read operation to time out.

generic

解决方案

  1. 80% 成功率
    pip install --timeout 120 package
  2. 85% 成功率
    pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple package
  3. 75% 成功率
    pip install --proxy http://user:pass@proxy:port package

无效尝试

常见但无效的做法:

  1. 50% 失败

    Transient issues may resolve, but persistent timeouts require configuration changes.

  2. 95% 失败

    SSL verification is not the cause of timeout.

  3. 90% 失败

    The issue is network-related, not package-specific.