ERROR: Could not find a version that satisfies the requirement xxx

安装指令

pip install torchsummary

报错

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection
 object at 0x000001AC15B5A820>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /pypi/web/simple/torchsummary/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection
 object at 0x000001AC15B5AB50>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /pypi/web/simple/torchsummary/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection
 object at 0x000001AC15B5AD00>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /pypi/web/simple/torchsummary/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection
 object at 0x000001AC15B5AEE0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /pypi/web/simple/torchsummary/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection
 object at 0x000001AC15B5AFA0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /pypi/web/simple/torchsummary/
ERROR: Could not find a version that satisfies the requirement torchsummary (from versions: none)
ERROR: No matching distribution found for torchsummary

初步分析,是网络原因。

解决办法

加镜像源

pip install torchsummary -i http://mirrors.aliyun.com/pypi/simple/

又报错

WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instea
d, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'.
ERROR: Could not find a version that satisfies the requirement torchsummary (from versions: none)
ERROR: No matching distribution found for torchsummary

解决办法,成功!

再加个信任镜像源

pip install torchsummary -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com

常用镜像源汇总

清华大学:https://pypi.tuna.tsinghua.edu.cn/simple/
中国科技大学:https://pypi.mirrors.ustc.edu.cn/simple/
华中科技大学:https://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/
阿里云:https://mirrors.aliyun.com/pypi/simple/
网易云:https://mirrors.163.com/pypi/simple/
百度云:https://mirror.baidu.com/pypi/simple/
华为云:https://mirrors.huaweicloud.com/repository/pypi/simple/
腾讯云:https://mirrors.cloud.tencent.com/pypi/simple/
搜狐:http://mirrors.sohu.com/Python/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值