Python3.10需要openssl1.11,而默认的不是,如果忽略这个,之后在跑Python会报错
(Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
运行 openssl version 查看版本是否要升级OpenSSL 1.0.2k-fips 26 Jan 2017
升级openssl
yum -y remove openssl openssl-devel
yum install -y make gcc perl-core pcre-devel wget zlib-devel
wget --no-check-certificate https://www.openssl.org/source/old/1.1.1/openssl-1.1.1k.tar.gz
tar -xzvf openssl-1.1.1k.tar.gz
cd openssl-1.1.1k
./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib no-shared zlib-dynamic
make && make install
部署Python
yum install -y epel-release
yum install -y openssl11 openssl11-devel
ln -sf /usr/lib64/pkgconfig/openssl11.pc /usr/lib64/pkgconfig/openssl.pc
yum install -y zlib-devel bzip2-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel libffi-devel xz-devel gcc
wget https://www.python.org/ftp/python/3.10.11/Python-3.10.11.tgz
tar -zxvf Python-3.10.11.tgz
cd Python-3.10.11
./configure --prefix=/usr/local --with-ssl=/etc/ssl
make && make install
ln -s /usr/local/bin/python3.10 /usr/bin/python3
ln -s /usr/local/bin/pip3.10 /usr/bin/pip3
pip3 install --upgrade pip
本文《Centos7 Python3.10安装部署》由爱思考吧 isres.com 分享,转载请注明出处。本文网址:https://www.isres.com/bushu/48.html
本站主要收集测评能够节省时间和提升效率的软件工具并分享使用与学习的过程和感受,任何情况下用户都需遵守所使用软件资源的相关协议。与《Centos7 Python3.10安装部署》有关的本站文章及资源仅供个人学习交流使用,相关资源请下载后24小时内删除,请勿用于其它用途,因此产生的任何问题由您自行承担。