已解决WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python
阿里云国内75折 回扣 微信号:monov8 |
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6 |
已解决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包中的pip21.0.1
警告连接被“SSLError”“无法连接到HTTPS URL因为SSL模块不可用。”断开后正在重试重试总计=4连接=无读取=无重定向=无状态=无/simple/pip/
…
无法获取URLhttps://pypi.tuna.tsinghua.edu.cn/simple/pip/:确认ssl证书时出现问题HTTPSConnectionPoolhost=‘ypi.tuna.tsinghua.edu.cn’port=443url:/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问题以及粉丝群里小伙伴提出的各种问题文章形式报错代码 + 报错翻译 + 报错原因 + 解决方法包括程序安装、运行程序过程中等等问题订阅专栏+关注博主后如遇到其他问题可私聊帮忙解决