当前位置:   article > 正文

已解决WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python

pip is configured with locations that require tls/ssl, however the ssl modul

已解决(pip升级报错)
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: pip in e:\anaconda\install_root\lib\site-packages (21.0.1)
WARNING: 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/pip/

Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.tuna.tsinghua.edu.cn’, port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)) - skipping









报错代码



粉丝群里面的一个小伙伴想升级pip,但是发生了报错(当时他心里瞬间凉了一大截,跑来找我求助,然后顺利帮助他解决了,顺便记录一下希望可以帮助到更多遇到这个bug不会解决的小伙伴),报错代码如下:

在这里插入图片描述


报错信息截图如下


在这里插入图片描述




报错翻译



报错信息翻译


警告:pip配置了需要TLS/SSL的位置,但是Python中的SSL模块不可用。
查找索引:https://pypi.tuna.tsinghua.edu.cn/simple
已满足要求:e:\anaconda\install_root\lib\site包中的pip(21.0.1)
警告:连接被“SSLError”(“无法连接到HTTPS URL,因为SSL模块不可用。”)断开后,正在重试(重试(总计=4,连接=无,读取=无,重定向=无,状态=无):/simple/pip/

无法获取URLhttps://pypi.tuna.tsinghua.edu.cn/simple/pip/:确认ssl证书时出现问题:HTTPSConnectionPool(host=‘ypi.tuna.tsinghua.edu.cn’,port=443):url:/simple/pip/超过了最大重试次数(由SSLError(“无法连接到HTTPS url,因为ssl模块不可用。”)-跳过





报错原因



报错原因:Python中的SSL模块不可用,导致ssl证书认证失败。





解决方法



(1)加上--trusted-host pypi.tuna.tsinghua.edu.cn后缀表示信任镜像文件:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U --trusted-host pypi.tuna.tsinghua.edu.cn
  • 1

在这里插入图片描述


(2)上面语句如果不行的话执行下面这条:

pip install -i http://pypi.douban.com/simple/  pip -U --trusted-host pypi.douban.com
  • 1

以上是此问题报错原因的解决方法,欢迎评论区留言讨论是否能解决,如果有用欢迎点赞收藏文章谢谢支持,博主才有动力持续记录遇到的问题!!!

千人全栈VIP答疑群联系博主帮忙解决报错

由于博主时间精力有限,每天私信人数太多,没办法每个粉丝都及时回复,所以优先回复VIP粉丝,可以通过订阅限时9.9付费专栏《100天精通Python从入门到就业》进入千人全栈VIP答疑群,获得优先解答机会(代码指导、远程服务),白嫖80G学习资料大礼包,专栏订阅地址:https://blog.csdn.net/yuan2019035055/category_11466020.html

  • 优点作者优先解答机会(代码指导、远程服务),群里大佬众多可以抱团取暖(大厂内推机会),此专栏文章是专门针对零基础和需要进阶提升的同学所准备的一套完整教学,从0到100的不断进阶深入,后续还有实战项目,轻松应对面试!

  • 专栏福利简历指导、招聘内推、每周送实体书、80G全栈学习视频、300本IT电子书:Python、Java、前端、大数据、数据库、算法、爬虫、数据分析、机器学习、面试题库等等

  • 注意:如果希望得到及时回复,订阅专栏后私信博主进千人VIP答疑群在这里插入图片描述
    在这里插入图片描述

免费资料获取,更多粉丝福利,关注下方公众号获取

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/blog/article/detail/36954
推荐阅读
相关标签
  

闽ICP备14008679号