参考: Linux中安装python3.9教程(详细)-CSDN博客
sudo yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
# 编译时报错:Failed to build these modules: _ctypes, 执行下面命令
sudo yum -y install libffi-devel
tar -zxvf Python-3.8.17.tgz
cd Python-3.8.17/
sudo ./configure prefix=/usr/local/python38
sudo make
sudo make install
sudo ln -s /usr/local/python38/bin/python3.8 /usr/bin/python38
python38 -V
sudo ln -s /usr/local/python38/bin/pip3.8 /usr/bin/pip38
pip38 -V