尝试安装python包时出现超时错误

时间:2021-03-18 08:15:49

标签: python pip ping

我最近一直在使用 Python,但我无法在我的 Windows 10 机器上安装软件包。每当我尝试安装任何新软件包时,都会出现以下错误:

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. (read timeout=15)")': /simple/[module name]/

我尝试 ping pypi.org 几次,通常只有 25-75% 的成功率。

Pinging pypi.org [2a04:4e42::223] with 32 bytes of data:
Reply from 2a04:4e42::223: time=214ms
Reply from 2a04:4e42::223: time=214ms
Request timed out.
Reply from 2a04:4e42::223: time=214ms

Ping statistics for 2a04:4e42::223:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 214ms, Maximum = 214ms, Average = 214ms

我还在虚拟机上运行 Ubuntu,下载模块没有任何问题,所以我认为这不是硬件问题。我使用的是未激活的 Windows 10,这可能是问题吗?

版本: 蟒蛇 3.9.2 点子 20.2.3

0 个答案:

没有答案