问题:centos上,python无法发送https请求。

安装 openssl-1.0.2r
[[email protected] ~]# wget http://www.openssl.org/source/openssl-1.0.2r.tar.gz
[[email protected] ~]# tar zxvf openssl-1.0.2r.tar.gz
[[email protected] ~]# ./config --prefix=/opt/openssl1.0.2r --openssldir=/opt/openssl1.0.2r/openssl no-zlib
[[email protected] ~]# make && make install

进入Python源码目录
Can‘t connect to HTTPS URL because the SSL module is not available
cd Modules
Can‘t connect to HTTPS URL because the SSL module is not available
Can‘t connect to HTTPS URL because the SSL module is not available

重新编译安装Python3

Can‘t connect to HTTPS URL because the SSL module is not available

相关文章: