pip is configured with locations that require TLS/SSL, however the ssl module in Python is not avail

网友投稿 426 2022-09-22

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not avail

安装模块的时候,报错:

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting scrapy Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)’: /simple/scrapy/ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)’: /simple/scrapy/ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)’: /simple/scrapy/ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)’: /simple/scrapy/ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)’: /simple/scrapy/ Could not fetch URL ​​​There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘​​​pypi.org​​​’, port=443): Max retries exceeded with url: /simple/scrapy/ (Caused by SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)) - skipping Could not find a version that satisfies the requirement scrapy (from versions: ) No matching distribution found for scrapy

原因是Python没有支持好TLS/SSL。 一种解决方法是跳过TLS/SSL。 在windows用户目录下新建pip/pip.ini(utf-8编码),使用国内镜像:

[global]index-url=import sslTraceback (most recent call last): File "", line 1, in File "C:\ProgramData\Anaconda3\lib\ssl.py", line 101, in import _ssl # if we can't import it, let the error propagate

可以安装​​ish_parser​​:

pip install ish_parser

其他国内镜像还有:​​​豆瓣​​​阿里​​​华中理工大学​​​山东理工大学​​​中国科学技术大学​​​清华

Centos下就是重新编译Openssl:

yum install

参考:​​​https://github.com/pypa/virtualenv/issues/1139​​​​https://github.com/LBNL-JCI-ICF/better/issues/6​​

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:丁道师:从孙正义、巴菲特、刘二海“跌落神坛”谈起:警惕以偏概全式的认知!
下一篇:composer 国内镜像 阿里镜像
相关文章

 发表评论

暂时没有评论,来抢沙发吧~