已解决WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python
已解决(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:anacondainstall_rootlibsite-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:anacondainstall_rootlibsite包中的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
(2)上面语句如果不行的话执行下面这条:
pip install -i http://pypi.douban.com/simple/ pip -U --trusted-host pypi.douban.com
帮忙解决
本文已收录于:《告别Bug》专栏
本专栏用于记录学习和工作中遇到的各种疑难Bug问题,以及粉丝群里小伙伴提出的各种问题,文章形式:报错代码 + 报错翻译 + 报错原因 + 解决方法,包括程序安装、运行程序过程中等等问题,订阅专栏+关注博主后如遇到其他问题可私聊帮忙解决!!!
相关文章
- c语言中main函数是什么
- 怎样用jupyter读取D盘文件?
- php去除小数点后多余0的方法
- 安装anaconda后spyder图标找不到解决方法
- pycharm怎么打开左侧项目窗口
- windows下如何下载安装spyder
- php empty()函数的用法
- php命令模式如何理解
- php数组转字符串
- 怎么关闭jupyter notebook?
- php数组去重
- 怎样卸载anaconda
- 怎么中断jupyter的运行?
- linux怎么打开pycharm?
- pycharm不显示项目目录怎么办
- 如何解决pycharm找不到模块
- ps抠图教程之使用魔棒工具抠图
- 代理IP服务器如何切换
- 如何使用spyder创建项目
- 如何改进代理服务器的安全性?