到官网下载对应的软件包
[root@localhost ~]# yum install -y gcc gcc-c++ zlib zlib-devel readline-devel
[root@localhost ~]# wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
解压安装
[root@localhost ~]# tar xvf Python-3.7.3.tar.xz
[root@localhost ~]# cd Python-3.7.3/
[root@localhost Python-3.7.3]# ./configure
[root@localhost Python-3.7.3]# make
[root@localhost Python-3.7.3]# make install