今天用pip3安装第三方库的时候报了这样一个错:

  Can't connect to HTTPS URL because the SSL module is not available. - skipping

[root@python_test ~]# rpm -qa openssl  # 检查了一下是安装了openssl的
openssl-1.0.1e-57.el6.x86_64

于是我将原先编译安装好的python目录删除后,重新编译安装:

[root@python_test tools]# tar xf Python-3.6.3.tgz
[root@python_test Python-3.6.3]# ./configure --prefix=/usr/local/python3.6.3 --with-ssl    # pip3会用到ssl模块,之前没有指定所以该功能不能使用
[root@python_test Python-3.6.3]# make && make install

最后测试发现已经可以了:

[root@pygame ~]# pip3 install pygame
Collecting pygame
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb129etRyf5a20>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pygame/
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb129fWER12128>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pygame/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb129ef5WER5c0>: Failed to establish a new connection: [Errno 110] Connection timed out',)': /simple/pygame/
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb129eaEWR9cf8>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /packages/b3/5e/fb7c85304ad1fd52008fd25fce97a7f59e6147ae97378afc86cf0f5d9146/pygame-1.9.4-cp36-cp36m-manylinux1_x86_64.whl
Downloading https://files.pythonhosted.org/packages/b3/5e/fb7c85304ad1fd52008fd25fce97a7f59e6147ae97378afc86cf0f5d9146/pygame-1.9.4-cp36-cp36m-manylinux1_x86_64.whl (12.1MB)
100% |████████████████████████████████| 12.1MB 61kB/s
Installing collected packages: pygame
Successfully installed pygame-1.9.4

然后测试一下ssl模块是否可用:

[root@python_test ~]# python3
Python 3.6.3 (default, Dec 27 2018, 05:50:10)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import ssl    # 没报错说明可以用了
>>>

Can't connect to HTTPS URL because the SSL module is not available. - skipping的更多相关文章

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

    pip is configured with locations that require TLS/SSL, however the ssl module in Python is not avail ...

  2. centos7中python3.6报错ModuleNotFoundError: No module named '_ssl' 或者 Max retries exceeded with url: / (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",))

    如果在运行爬虫时报此错:requests.exceptions.SSLError: HTTPSConnectionPool(host='www.baidu.com', port=443): Max r ...

  3. Caused by SSLError("Can’t connect to HTTPS URL because the SSL module is not available)

    window7系统: 今天刚安装的anaconda(开源的Python包管理器),把原来的python3和python2都给卸载了,结果运行爬虫程序的时候报错: Caused by SSLError( ...

  4. centos6.8安装python3.7.3报错Can't connect to HTTPS URL because the SSL module is not available问题解决

    环境:CentOS release 6.8 (Final) # 直接编译python3.7在使用pip3安装依赖的时候报错: Can't connect to HTTPS URL because th ...

  5. python https 无法访问 SSLError("Can\'t connect to HTTPS URL because the SSL module is not available

    1,需要检查python 安装的时候是否支持 https 进入python 环境,import ssl 如果正常导入就可以使用https,不能导入就需要进入下一步. 2,查看系统是否安装了openss ...

  6. python pip安装模块报错 "Can't connect to HTTPS URL because the SSL module is not available."

    在升级python版本为3.6之后,pip安装模块报错. 报错信息如图: 原因是系统自带的openssl版本与python3的版本不匹配,所以这里只要升级openssl版本就可以解决问题. yum - ...

  7. Linux小记 -- [已解决]Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings

    问题描述 操作系统:Ubuntu Server 18.04 LTS Ubuntu每次启动时产生如下motd(message of today)输出 Failed to connect to https ...

  8. ActiveMQ Could not connect to broker URL

    javax.jms.JMSException: Could not connect to broker URL: http://localhost:8161/. Reason: java.io.IOE ...

  9. iOS开发HTTPS实现之信任SSL证书和自签名证书

    iOS开发HTTPS实现之信任SSL证书和自签名证书 转自:http://www.jianshu.com/p/6b9c8bd5005a/comments/5539345 (收录一下供自己学习用的) 字 ...

随机推荐

  1. Java RMI学习与解读(一)

    Java RMI学习与解读(一) 写在前面 本文记录在心情美丽的一个晚上. 嗯.就是心情很美丽. 那为什么晚上还要学习呢? emm... 卷... 卷起来. 全文基本都是根据su18师傅和其他师傅的文 ...

  2. Beta阶段第六次会议

    第六次会议 时间:2020.5.22 完成工作 姓名 任务 难度 完成度 xyq 1.编写技术博客 中 90% ltx 1.编写小程序2.添加全局变量之后页面无法加载的bug 中 90% lm(迟到) ...

  3. 野指针和free总结超有用的资料

    在C语言项目中,经常会遇到需要程序员手动分配内存的地方.这样做能够节省大量的内存空间,也让程序更加灵活.只要你有一定的基础,那么肯定用过 malloc 或者 ralloc和free的组合.这个组合使用 ...

  4. 双堆DEAP

    记录一道遇到的考研真题 特性分析: DEAP为一颗完全二叉树,左子树小堆,右子树大堆,故左右子树分别可以用l[].r[]数组存储,用m和n分别表示当前两完全二叉树的结点,左右子树高度差为1,且左子树的 ...

  5. jQuery常用验证

    1.文本框不能为为空 if ($("#RushStartTime").val() == "") { alert("请输入该产品.."); $ ...

  6. Python AttributeError: module 'sys' has no attribute 'setdefaultencoding'

    Python 3 与 Python 2 有很大的区别,其中Python 3 系统默认使用的就是utf-8编码. 所以,对于使用的是Python 3 的情况,就不需要sys.setdefaultenco ...

  7. Vue&Element开发框架中增加工作流处理,查看申请单中整合多个处理类型的处理

    关于我在Winform框架.混合框架.Bootstrap开发框架中的简易审批性工作流模块,我写过不少文章,有兴趣可以参考<工作流模块>的随笔进行了解,本篇随笔在完成了Vue&Ele ...

  8. UVA1104 Chips Challenge

    一.题目 有一个 \(n\times n\) 的矩阵,每个元素可能是 ..C./ 的其中一种,分别表示可以放置芯片.已经放置了芯片.不能放置芯片,你可以分别决定是否可以放置芯片的位置放置芯片. 最后需 ...

  9. Mysql教程:(四)连接查询

    连接查询 1.左连接查询: mysql> select stu.*,sc.*,maths+sc.chinese+sc.english from student stu left join sco ...

  10. mybatis之结果集的映射方式

    查询的几种情况 // 1)查询单行数据返回单个对象 public Employee getEmployeeById(Integer id ); // 2) 查询多行数据返回对象的集合 public L ...