美文网首页
WARNING: Retrying (Retry(total=4

WARNING: Retrying (Retry(total=4

作者: 热爱生活H_Li | 来源:发表于2021-01-03 16:51 被阅读0次

人在日本,在Linux系统和win10使用Anaconda下载包的时候都出现了这个问题。由于实验室的有线网络确实用的代理,所以被认为不安全也是正常的。
完整报错信息:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1091)'))': /pkgs/main/tensorflow/
Could not fetch URL https://repo.anaconda.com/pkgs/main/tensorflow/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/main/tensorflow/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1091)'))) - skipping
ERROR: Could not find a version that satisfies the requirement tensorflow
ERROR: No matching distribution found for tensorflow
Could not fetch URL https://repo.anaconda.com/pkgs/main/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/main/pip/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1091)'))) - skipping

方法1

参考https://blog.csdn.net/qq_34504481/article/details/81910253获得的解决方法是:

新建~/.pip
ls ~/.pip/pip.conf
vi ~/.pip/pip.conf
复制
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
保存即可

方法2

pip install keras(或者你想安装的包) -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

douban是挺稳定的,基本的包都能下,境外慢一点,至少大部分情况下还能用(pytorch就不行了)

方法3(win10)
安装Proxifier,然后在这里面设置代理,就不会有这个问题


image.png image.png

相关文章

网友评论

      本文标题:WARNING: Retrying (Retry(total=4

      本文链接:https://www.haomeiwen.com/subject/eexyoktx.html