最近在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
本文介绍了在Centos7中安装Python3.6.2后遇到的pip3命令无法正常使用的问题及解决方案。主要原因是Python环境中缺失了SSL模块,通过两种方法尝试解决此问题:一是重新配置Python编译选项;二是安装openssl-devel包来解决问题。

718

被折叠的 条评论
为什么被折叠?



