今天用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. 航胥:北航教务助手——Alpha阶段发布声明

    本软件项目为北京航空航天大学2020年"软件工程"课程项目 v1.0.5版本下载地址:https://bhpan.buaa.edu.cn:443/#/link/D10B71B69E ...

  2. [技术博客] 利用SharedPreferences来实现登录状态的记忆功能

    [技术博客] 利用SharedPreferences来实现登录状态的记忆功能 一.SharedPreferences简介 SharedPreferences是Android平台上一个轻量级的存储辅助类 ...

  3. 【二食堂】Alpha - Scrum Meeting 2

    Scrum Meeting 2 例会时间:4.11 20:00 - 20:30 进度情况 组员 今日进度 明日任务4.12不开会 李健 1. 学习并成功搭建简单的网页issue2. 学习JS基础知识i ...

  4. DDL_Killer Alpha版本 Bug集中反馈处

    本博客用于DDL_Killer Alpha版本的Bug集中反馈. 您可以在本博客的下方评论区处留言,反馈您在使用DDl_Killer的过程中遇到的问题,以帮助我们更好的改进本产品. 我们会尽快修复找到 ...

  5. 《HelloGitHub》第 67 期

    兴趣是最好的老师,HelloGitHub 让你对编程感兴趣! 简介 分享 GitHub 上有趣.入门级的开源项目. https://github.com/521xueweihan/HelloGitHu ...

  6. 因为一个小小的Integer问题导致阿里一面没过,遗憾!

    面试题:new Integer(112)和Integer.valueOf(112)的区别 面试官考察点猜想 这道题,考察的是对Integer这个对象原理的理解,关于这道题的变体有很多,我们会一一进行分 ...

  7. 编译内核错误:Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at kernel/timeconst.pl line 373

    最近在编译一个新的rk sdk的时候,编译内核报错 CHK include/linux/version.h CHK include/generated/utsrelease.h make[1]: 'i ...

  8. linux 文件描述符和inode 的理解和区别

    inode 或i节点是指对文件的索引.如一个系统,所有文件是放在磁盘或flash上,就要编个目录来说明每个文件在什么地方,有什么属性,及大小等.就像书本的目录一样,便于查找和管理.这目录是操作系统需要 ...

  9. Centos 7 编译安装llvm 8.0.0

    参考连接:https://www.cnblogs.com/BinBinStory/p/7499527.html https://blog.csdn.net/llwy1428/article/detai ...

  10. Linux 文本三剑客之 awk

    Linux 系统中一切皆文件. 文件是个文本.可以读.可以写,如果是二进制文件,还能执行. 在使用Linux的时候,大都是要和各式各样文件打交道.熟悉文本的读取.编辑.筛选就是linux系统管理员的必 ...