1. 从 https://www.python.org/downloads/release/python-376/ 复制tgz源码包地址
[root@localhost ~]#wget https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tgz [root@localhost ~]#tar -xzvf Python-3.7.1.tgz
2. 安装编译
[root@localhost ~]#cd Python-3.7.1 [root@localhost Python-3.7.1]# yum install gcc* glien* -y [root@localhost ~]# yum install libffi-devel [root@localhost ~]# yum install zlib* [root@localhost ~]# ./configure --prefix=/usr/local/python3.7 [root@localhost ~]#ln -s /usr/local/python3.7/bin/python3.7 /bin/python3.7 [root@localhost ~]# ln -s /usr/local/python3.7/bin/pip3 /bin/pip3