Python3.6升级到3.9
1.升级openssl到1.1.1n
cd /data/softwares cd openssl-1.1.1n ./config make && make install ln -s /usr/local/lib64/libssl.so.1.1 /usr/lib64/libssl.so.1.1 ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1 mv /usr/bin/openssl /usr/bin/openssl.old ln -sv /usr/local/bin/openssl /usr/bin/openssl reboot
2.删除已安装的python3版本
yum remove python3
3.下载python3.9.11并解压
wget https://www.python.org/ftp/python/3.9.11/Python-3.9.11.tgz
tar -vxzf Python-3.9.11.tgz
tar -vxzf Python-3.9.11.tgz
4.安装
cd Python-3.9.11 ./configure #--enable-optimizations make make install ln -s /usr/local/bin/python3.9.11 /usr/bin/python3 ln -s /usr/local/bin/pip3 /usr/bin/pip3 python3 --version