centos解决 pip is configured with locations that require TLS/SSL, however the ssl module in Python is
2022/5/5 7:13:38
本文主要是介绍centos解决 pip is configured with locations that require TLS/SSL, however the ssl module in Python is,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
一、下载 openssl 编译安装
openssl 官方下载地址:https://www.openssl.org/source/
wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1d.tar.gz
解压
tar -zxvf OpenSSL_1_1_1d.tar.gz
二、编译安装
进入openssl-OpenSSL_1_1_1d
cd openssl-OpenSSL_1_1_1d
指定安装路径并编译
./config --prefix=/usr/local/openssl // 指定安装路径 make && make install
三、替换当前系统的旧版本 openssl 「先保存原来的」
mv /usr/bin/openssl /usr/bin/openssl.old mv /usr/lib64/openssl /usr/lib64/openssl.old mv /usr/lib64/libssl.so /usr/lib64/libssl.so.old ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl ln -s /usr/local/openssl/include/openssl /usr/include/openssl ln -s /usr/local/openssl/lib/libssl.so /usr/lib64/libssl.so echo "/usr/local/openssl/lib" >> /etc/ld.so.conf ldconfig -v // 建立动态链接
四、最后查看当前系统 openssl 版本
openssl version
五、重新编译Python3.7
进入解压后的Python目录
cd Python-3.7.1 ./configure --prefix=/usr/local/python3 --with-openssl=/usr/local/openssl make make install ln -sf /usr/local/python3/bin/python3 /usr/bin/python3 ln -sf /usr/local/python3/bin/pip3 /usr/bin/pip3
六、查看是否安装成功
python3 -V pip3 -V
这篇关于centos解决 pip is configured with locations that require TLS/SSL, however the ssl module in Python is的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-21Python编程基础教程
- 2024-11-20Python编程基础与实践
- 2024-11-20Python编程基础与高级应用
- 2024-11-19Python 基础编程教程
- 2024-11-19Python基础入门教程
- 2024-11-17在FastAPI项目中添加一个生产级别的数据库——本地环境搭建指南
- 2024-11-16`PyMuPDF4LLM`:提取PDF数据的神器
- 2024-11-16四种数据科学Web界面框架快速对比:Rio、Reflex、Streamlit和Plotly Dash
- 2024-11-14获取参数学习:Python编程入门教程
- 2024-11-14Python编程基础入门