问题总结:ERROR: Could not find a version that satisfies the requirement transformers

问题描述:

安装trantsformers时出现以下问题,按照网上的方法改了很久还是不行,后来终于改好了

(base) root@adbb5f70256b:~# pip install trantsformers
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1129)’))’: /simple/transformers/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1129)’))’: /simple/transformers/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1129)’))’: /simple/transformers/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1129)’))’: /simple/transformers/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1129)’))’: /simple/transformers/
Could not fetch URL https://pypi.org/simple/transformers/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/transformers/ (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1129)’))) - skipping
ERROR: Could not find a version that satisfies the requirement transformers (from versions: none)
ERROR: No matching distribution found for transformers
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1129)’))) - skipping

解决方法:

1.首先,请检查一下服务器网络连接是否正常(我的没报网络错误,但是确实是断网了)断网的情况下啥也安装不了。
2.网络连接正常的情况下,依次尝试以下命令:

 pip install trantsformers

仍然报以上错误,接下来通过国内镜像源并添加信任(网上很多人都是这么做的,但是我的仍然报错)

 pip install transformers -i http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/  --trusted-host mirrors.tuna.tsinghua.edu.cn

不行又换了豆瓣镜像源

pip install pytorch_transformers -i https://pypi.douban.com/simple

这个没添加信任竟然可以了
也不明白具体因为什么。类似的问题可以多尝试一下。

你可能感兴趣的:(问题总结,Bert,hilbert,transform)