在线精品99_中国九九盗摄偷拍偷看_91免费版在线观看_91.app_91高清视频在线_99热最新网站

ubuntu pip is configured with locations that require TLS/SSL错误怎么解决

142次阅读
没有评论

共计 3144 个字符,预计需要花费 8 分钟才能阅读完成。

行业资讯    
服务器    
ubuntu pip is configured with locations that require TLS/SSL 错误怎么解决

这篇文章主要介绍“ubuntu pip is configured with locations that require TLS/SSL 错误怎么解决”,在日常操作中,相信很多人在 ubuntu pip is configured with locations that require TLS/SSL 错误怎么解决问题上存在疑惑,丸趣 TV 小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”ubuntu pip is configured with locations that require TLS/SSL 错误怎么解决”的疑惑有所帮助!接下来,请跟着丸趣 TV 小编一起来学习吧!

背景:
ubuntu 14.04

python3.8 
使用 pip install pymsql 提示错误:

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting django
 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/django/
 WARNING: 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/django/
 WARNING: 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/django/
 WARNING: 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/django/
 WARNING: 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/django/
 Could not fetch URL https://pypi.org/simple/django/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host= pypi.org , port=443): Max retries exceeded with url: /simple/django/ (Caused by SSLError( Can t connect to HTTPS URL because the SSL module is not available.)) - skipping
 ERROR: Could not find a version that satisfies the requirement django (from versions: none)
ERROR: No matching distribution found for django
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
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( Can t connect to HTTPS URL because the SSL module is not available.)) - skipping

原因:

因为 pip 安装第三方库需要 ssl 模块,而 python 默认安装 ssl 功能是不可用的

第一种解决方法:

解决办法是重新编译 python3 安装文件,加上 –with-ssl 参数就可以让 pip3 使用 ssl 功能了

# 重新编译安装
./configure --enable-optimizations --with-ssl

Ubuntu 16.04 安装(install)python3.8

第二种解决方法:更换 pip 源

永久修改 pip 源

如果需要永久修改 pip 的软件镜像源,可以通过修改配置文件实现。

在 Linux 下,修改~/.pip/pip.conf,如果没有则创建:

mkdir ~/.pip
vim ~/.pip/pip.conf

添加以下内容

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com

或者是:

[global] 
timeout = 6000 
index-url = http://pypi.douban.com/simple/ 
[install] 
use-mirrors = true 
mirrors = http://pypi.douban.com/simple/ 
trusted-host = pypi.douban.com

到此,关于“ubuntu pip is configured with locations that require TLS/SSL 错误怎么解决”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注丸趣 TV 网站,丸趣 TV 小编会继续努力为大家带来更多实用的文章!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-13发表,共计3144字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)
主站蜘蛛池模板: 久久国产综合尤物免费观看 | 日本视频网址 | 中文字幕在线免费看线人 | 国产精品亚洲精品一区二区三区 | 伊人爱爱网 | 97久久精品人人澡人人爽 | 奇米网777四色国产精品 | 国产成人精品无码专区 | 亚洲国产成人久久综合一区77 | 内谢少妇xxxxx8老少交 | 99精品视频在线 | 99久久精品免费精品国产 | 日日舔夜夜摸 | 午夜宅男在线永久免费观看网 | 精品久久久久久无码中文字幕 | 日韩视频在线免费观看 | 99久久精品毛片免费播放 | 999久久久免费精品国产 | 日韩中文字幕视频 | 久久国产精品女 | 国产91成人 | 97久久久亚洲综合久久88 | 小可爱资源影视在线观看 | 日韩中文在线 | 亚洲av无码成人精品区在线观看 | 色就色欧美综合偷拍区a | a一级免费 | 中文一级国产特级毛片视频 | 久久免费福利 | 亚洲av无码一区东京热久久 | 久久一本精品久久精品66 | 精品无码人妻一区二区免费蜜桃 | 黄网站欧美内射 | 欧美色图亚洲 | 久久久噜噜噜久久中文字幕色伊伊 | 精品一区二区三区免费播放 | 东京无码熟妇人妻av在线网址 | 国产精品无码一区二区三区电影 | 日本特黄aaaaaaa大片 | 老司机精品影院一区二区三区 | 明星性猛交ⅹxxx乱大交 |