pip的问题 Can't connect to HTTPS URL because the SSL module is not available

简介: pip的报错问题解决

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not fetch URL https://www.piwheels.org/simple/pip/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping

报了新的错误 :

Could not fetch URL https://pypi.org/simple/xlsxwriter/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/xlsxwriter/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1056)'))) - skipping

研究了好久只知道是证书的错误~按照网上的各种指导尝试了如下方案

1.第一种尝试方式:直接下载get-pip.py文件,执行命令python get-pip.py 结果是:失败

2.第二种尝试方式:加上--trusted-host 执行 pip --trusted-host pypi.python.org install xxx 结果是:失败

3.第三种尝试:发现是url的来源的问题,换成了国内的pip源就可以正常安装了,我使用的是:pip install xlrd -i http://pypi.douban.com/simple --trusted-host pypi.douban.com,结果:失败

1)http://mirrors.aliyun.com/pypi/simple/ 阿里云

2)https://pypi.mirrors.ustc.edu.cn/simple/ 中国科技大学

3) http://pypi.douban.com/simple/ 豆瓣

4) https://pypi.tuna.tsinghua.edu.cn/simple/ 清华大学

5) http://pypi.mirrors.ustc.edu.cn/simple/ 中国科学技术大学

4.第四种尝试:思考了一下混合了两个问题的解决方法,使用命令python -m pip install xlsxwriter --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org ,结果:成功

相关文章
|
8月前
|
存储 Java 网络安全
SpringCloud GateWay配置(TLS 和 SSL、Http超时配置)—官方原版
SpringCloud GateWay配置(TLS 和 SSL、Http超时配置)—官方原版
256 0
|
10月前
|
XML 安全 应用服务中间件
Linux上面配置Apache2支持Https(ssl)具体方案实现
虽然Nginx比较流行,但是由于一些老项目用到了Apache2来支持Web服务,最近想给服务上一个Https支持,虽然看似教程简单,但是也遇到一些特殊情况,经历了一番折腾也算是解决了所有问题,将过程记录如下。演示是基于Ubantu系统。
321 0
|
7月前
|
应用服务中间件 网络安全 nginx
Nginx学习研究-Nginx 安装 SSL 配置 HTTPS
Nginx学习研究-Nginx 安装 SSL 配置 HTTPS
286 0
|
3天前
|
前端开发 应用服务中间件 网络安全
nginx配置SSL证书配置https访问网站 超详细(附加配置源码+图文配置教程)
nginx配置SSL证书配置https访问网站 超详细(附加配置源码+图文配置教程)
81 0
|
3天前
|
前端开发 应用服务中间件 网络安全
http转为https,ssl证书安装及nginx配置
http转为https,ssl证书安装及nginx配置
63 1
|
3天前
|
存储 缓存 安全
https跳过SSL认证时是不是就是不加密的,相当于http?
https跳过SSL认证时是不是就是不加密的,相当于http?
130 0
|
7月前
|
安全 网络安全 API
SAP ABAP 通过 https 消费外部 API 遇到错误消息 SSSLERR_SSL_CONNECT
SAP ABAP 通过 https 消费外部 API 遇到错误消息 SSSLERR_SSL_CONNECT
131 0
|
3天前
|
安全 Java 网络安全
HTTPS的TLS/SSL协议详解及Java代码示例
HTTPS的TLS/SSL协议详解及Java代码示例
311 0
|
3天前
|
应用服务中间件 Linux 网络安全
Linux【脚本 06】HTTPS转发HTTP安装OpenSSL、Nginx(with-http_ssl_module)及自签名的X.509数字证书生成(一键部署生成脚本分享)
Linux【脚本 06】HTTPS转发HTTP安装OpenSSL、Nginx(with-http_ssl_module)及自签名的X.509数字证书生成(一键部署生成脚本分享)
72 1
|
3天前
【Error】fatal: unable to access ‘https://github.com/PanJiaChen/vue-element-admin/‘: OpenSSL SSL_read:
【Error】fatal: unable to access ‘https://github.com/PanJiaChen/vue-element-admin/‘: OpenSSL SSL_read: