您现在的位置是:主页 > news > 绵阳 网站开发 公司/谷歌推广优化

绵阳 网站开发 公司/谷歌推广优化

admin2025/6/6 6:43:39news

简介绵阳 网站开发 公司,谷歌推广优化,郑州工程建设信息网站,遵义做网站首先docker搭建python环境之后,然后使用pip install安装依赖库时,抛如下异常 pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. 首先明确问题出现原因,是因为openssl版本过低或…

绵阳 网站开发 公司,谷歌推广优化,郑州工程建设信息网站,遵义做网站首先docker搭建python环境之后,然后使用pip install安装依赖库时,抛如下异常 pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. 首先明确问题出现原因,是因为openssl版本过低或…

首先docker搭建python环境之后,然后使用pip install安装依赖库时,抛如下异常
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
在这里插入图片描述
首先明确问题出现原因,是因为openssl版本过低或者不存在 so:
查看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.6进行编译安装,用一下过程来实现编译安装:
这里先要找到python的安装路径,进入到python文件下

cd Python-3.6.4
./configure --with-ssl
make
sudo make install

安装完成之后,正常是可以使用 pip install 命令进行安装了。如果你和我一样,全部命令都执行完成,还是不行的话,就重新docker。

systemctl restart docker

重启docker之后,重新启动容器即可

在这里插入图片描述