前言
CentOS8下安装了Python3.9.5,然后使用pipenv创建虚拟环境,安装第三方库时一直失败,并提示:pip is configured with locations that require TLS/SSL, however the..。上网找到解决办法并记录下来,防止后面再踩坑。
解决办法
环境:
CentOS8
Python 3.9.5
pipenv 2021.5.29
问题原因:openssl版本过低或者不存在
-
查看openssl安装包,发现缺少openssl-devel包
[root@localhost ~]# rpm -aq|grep openssl openssl-0.9.8e-20.el5 openssl-0.9.8e-20.el5 [root@localhost ~]#
-
yum安装openssl-devel
[root@localhost ~]# yum install openssl-devel -y
查看安装结果
[root@localhost ~]# rpm -aq|grep openssl openssl-0.9.8e-26.el5_9.1 openssl-0.9.8e-26.el5_9.1 openssl-devel-0.9.8e-26.el5_9.1 openssl-devel-0.9.8e-26.el5_9.1
-
重新对python3.9.5进行编译安装,用一下过程来实现编译安装:
cd Python-3.9.5 ./configure --with-ssl make&&make install
至此问题解决
原文链接:https://blog.csdn.net/wbj_code_life/article/details/97887891