linux下python3出现pip is configured with locations that require TLS/SSL, however the..不可用的解决方法


前言

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版本过低或者不存在

  1. 查看openssl安装包,发现缺少openssl-devel包

    [root@localhost ~]# rpm -aq|grep openssl 
    openssl-0.9.8e-20.el5 
    openssl-0.9.8e-20.el5 
    [root@localhost ~]#
    
  2. 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
    
  3. 重新对python3.9.5进行编译安装,用一下过程来实现编译安装:

    cd Python-3.9.5
    ./configure --with-ssl
    make&&make install
    

    至此问题解决

    原文链接:https://blog.csdn.net/wbj_code_life/article/details/97887891


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM