python3中pip3安装出错,找不到SSL

最近在Centos7上安装Python3.6.2之后,使用pip3命令出现了问题,提示说找不到ssl模块,出现错误如下:

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

查材料发现两个解决办法:

第一种解决办法:添加./configure --with-ssl

cd Python-3.6.2
./configure --with-ssl
make
sudo make install

很遗憾没有解决!!!

第二种

shell环境,进入python3,import ssl报错,安装yum install openssl-devel -y

make
make install

解决。
参考:
https://blog.csdn.net/jeryjeryjery/article/details/77880227
http://www.cnblogs.com/yuechaotian/archive/2013/06/03/3115472.html

你可能感兴趣的:(Linux)