python离线安装wheel_python Pip安装使用wheel文件不工作

由于网络限制和证书错误,我无法正常使用pip安装python库。在

所以我尝试下载.whl并手动安装库。但是,它也失败了,因为同样的错误。在C:\python3.7>python -m pip install requests-2.21.0-py2.py3-none-any.whl

Processing c:\python3.7\requests-2.21.0-py2.py3-none-any.whl

Collecting idna<2.9,>=2.5 (from requests==2.21.0)

Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/idna/

Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/idna/

Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/idna/

Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/idna/

Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/idna/

Could not find a version that satisfies the requirement idna<2.9,>=2.5 (from requests==2.21.0) (from versions: )

No matching distribution found for idna<2.9,>=2.5 (from requests==2.21.0)

按建议尝试--use-wheel选项,但不起作用。看起来pip是旧的,但是我甚至不能升级pip,因为它还需要一个合适的工作网络。这是一个棘手的情况。在

^{pr2}$

如何手动安装库?在

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值