【centos7.4/python3.7.2】修复pip3错误pip is configured with locations that require TLS/SSL

错误名称:

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

实际上是python编译SSL的时候出错,下面来看下解决方法

 

0.环境说明:

①python3.7.2

②centos 7.4

 

1.安装依赖包:

 

2.打开ssl代码块儿 Python-3.7.2/Modules/Setup.dist 并让下面的配置可用

cd ***/Python-3.7.2  #***是你存放python的目录的位置

vi Modules/Setup.dist

3.接下来重新编译Python就不会报SSL错误了:

make clean
./configure --with-openssl=/usr/local/openssl --enable-optimizations
make
make install

 

发表评论

Your email address will not be published.