sudo yum -y update
sudo yum -y install yum-utils
sudo yum-builddep -y python3
curl -O https://www.python.org/ftp/python/3.9.16/Python-3.9.16.tar.xz
md5sum Python-3.9.16.tar.xz
tar -Jxv -f Python-3.9.16.tar.xz
cd Python-3.9.16
# ./configure --enable-optimizations --prefix=/usr/local/Python-3.9
./configure --prefix=/usr/local/Python-3.9
make
sudo make altinstall
sudo ln -sf /usr/local/Python-3.9/bin/python3.9 /usr/bin/python3
sudo ln -sf /usr/local/Python-3.9/bin/pip3.9 /usr/bin/pip3
cd ..
sudo rm -rf Python-3.9.16
标签:tar,CentOS,16,Python,sudo,usr,7.9,3.9
From: https://www.cnblogs.com/f0rsaken/p/17043400.html