使用pip使用报错:pip is configured with locations that require TLS/SSL

编译安装完python3.10后,pip不能使用!

出现报错:

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

网上文章说在configure这一步上加上--with openssl: 

./configure --prefix=/usr/local/python3  --with-openssl=/usr/bin/openssl

但是问题没有解决,用yum进行更新openssl也不行,再编译python3.10也还是报错。

问题解决:

下载openssl包,重新安装openssl:

#下载openssl包:
wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1d.tar.gz

#解压:
tar -xvf OpenSSL_1_1_1d.tar.gz -C .

#编译安装:
cd OpenSSL_1_1_1d
.confiugre --prefix=/usr/local/openssl && make && make install 

在安装过程中,时间略长。

打开/usr/local/bin/openssl再次报错:

openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

问题解决:

查看在安装的openssl的lib文件夹里有无有如下的库文件:libcrypto.so.11和libssl.so.1.1

 为其建立软连接:

再次打开/usr/local/openssl/bin/openssl ,成功进入!

 比较旧版和新版openssl的版本号:

对旧版openssl进行保存或删除

重新安装编译python3.10

#下载源码包:
wget https://www.python.org/ftp/python/3.10.4/Python-3.10.4.tgz

#解压:
tar -xvf P*

#编译安装:
cd P*4
configure --prefix=/usr/local/python3.10 --with-openssl=/usr/local/openssl
make && make install

更新pip3.10

 删除源码包,也可以保存

#删除openssl源码包:
rm -Rf O*
rm -Rf o*

#删除Python源码包:
rm -Rf P*

文章来源地址https://uudwc.com/A/On9k9

原文地址:https://blog.csdn.net/Huang_8208_sibo/article/details/124774075

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请联系站长进行投诉反馈,一经查实,立即删除!

h
上一篇 2023年08月02日 01:07
MySQL 8.1正式发行!有哪些值得关注的新功能?
下一篇 2023年08月02日 01:09