python network_error ai_generated partial

警告:在连接因 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))' 中断后重试(Retry(total=4, ...)):/simple/numpy/

WARNING: Retrying (Retry(total=4, ...)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/numpy/

ID: python/pip-download-failed-connection-reset

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

版本兼容性

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

根因分析

网络中间件、代理或限流器在大型索引下载期间重置了 TCP 连接。

English

A network middlebox, proxy, or rate limiter is resetting the TCP connection during large index downloads.

generic

解决方案

  1. 85% 成功率
    pip install --retries 10 --timeout 60 --index-url https://pypi.tuna.tsinghua.edu.cn/simple numpy
  2. 90% 成功率
    curl -L -O https://files.pythonhosted.org/packages/.../numpy-2.1.0-cp311-cp311-manylinux_2_17_x86_64.whl
    pip install ./numpy-2.1.0-cp311-cp311-manylinux_2_17_x86_64.whl

无效尝试

常见但无效的做法:

  1. 80% 失败

    Disabling the cache does not prevent the connection reset.

  2. 95% 失败

    Reducing retries makes the failure immediate rather than fixing the network issue.

  3. 90% 失败

    Lowering the timeout causes more timeouts and does not address the reset.