安装必要包

Python安装需要GCC编译器

yum install gcc openssl-devel bzip2-devel libffi-devel

下载Python 3.7

wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz

解压

tar xzf Python-3.7.3.tgz

安装Python 3.7

./configure --enable-optimizations
make
make install

检查Python版本

python3.7 -V