01、Python3.7编译安装
#01、下载依赖
sudo yum install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel libffi-devel -y
wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
tar -xvf Python-3.7.3.tgz
mkdir /usr/local/python3
#02、下载openSSL
wget http://www.openssl.org/source/openssl-1.1.1l.tar.gz --no-check-certificate
mkdir /usr/local/ssl
./config --prefix=/root/openssl1.0.2r --openssldir=/root/openssl1.0.2r/openssl no-zlib
make && make install
echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
ldconfig -v
ll /usr/local/ssl
vim /root/Python-3.7.3/Modules/Setup
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/baf8ac618b633ab9730ea0b9d7bd89a6.png)
#03、编译安装
cd /root/Python-3.7.3/
./configure --prefix=/usr/local/python3
make && make install