栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

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

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

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

安装个新的python,结果pip一直不能用,不能联网,是因为python安装的时候,没有安装ssl模块

这个模块对应的软件是openssl

要求版本比较特殊

Could not build the ssl module!

Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().

我用yum安装的版本只有,1.0.1.不满足

所以

wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2.tar.gz

tar zxvf openssl-1.0.2.tar.gz 

cd openssl-1.0.2

mkdir build

./config 

./config --prefix=`pwd`/build/ --openssldir=`pwd`/build


make -j 10

make install

安装openssl过程中,如果在make install 出现install_sw Error 1错误。则因为安装目录在软件主目录,不可覆盖原始文件,所以mkdir build,安装在此处

之后进入python目录

./configure --prefix=`pwd` --with-openssl=~/software/openssl-1.0.2/build/

make -j 10

make install

成了

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/987602.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号