解决python3.* 安装后使用 pip3出现 Can't connect to HTTPS URL because the SSL module is not available问题

解决python3.* 安装后使用 pip3出现 Can’t connect to HTTPS URL because the SSL module is not available问题

博主使用的linux是centos7

前言

博主在安装了python3.6后使用pip3安装redis,结果报错 Can’t connect to HTTPS URL because the SSL module is not available
通过以下方式解决了问题

安装openssl

1. yum install openssl
2. yum install openssl-devel

重新源码安装

[root@localhost Python-3.6.2]# ./configure --prefix=/usr/local/python3/ --enable-shared --enable-loadable-sqlite-extensions 
[root@localhost Python-3.6.2]# make && make install

可能出现的问题

在这里插入图片描述

解决措施

出现这个错误的原因是因为没有加载到相应的库文件
首先进入解压后的编译目录

[root@localhost Python-3.6.2]# cp libpython3.6m.so.1.0 /usr/local/lib64/
[root@localhost Python-3.6.2]# cp libpython3.6m.so.1.0 /usr/lib
[root@localhost Python-3.6.2]# cp libpython3.6m.so.1.0 /usr/lib64

eventually

能正常使用pip3啦~
解决python3.* 安装后使用 pip3出现 Can't connect to HTTPS URL because the SSL module is not available问题_第1张图片

你可能感兴趣的:(问题解决,python,ssl)