1.安装编译所需的依赖
sudo yum -y update
sudo yum -y install openssl-devel libffi-devel bzip2-devel
sudo yum -y groupinstall "Development Tools"
2. 安装 Python 3.10 必需的 openssl >= 1.1.1
wget https://www.openssl.org/source/openssl-1.1.1q.tar.gz --no-check-certificate
tar zxf openssl-1.1.1q.tar.gz
cd openssl-1.1.1q
./config --prefix=/usr/local/openssl-1.1.1
sudo make && sudo make install
3. 安装 Python 3.10
wget https://www.python.org/ftp/python/3.10.5/Python-3.10.5.tgz
tar zxf Python-3.10.5.tgz
cd Python-3.10.5
./configure --enable-optimizations --with-openssl=/usr/local/openssl-1.1.1 --with-openssl-rpath=auto
sudo make && sudo make install
添加软链接
先查看系统python的位置在哪儿
whereis python
标签:1.1,CentOS,Python,sudo,openssl,3.10,-- From: https://www.cnblogs.com/zhaoyingjie/p/17783221.html