1. 下载源码包
2. 上传服务器并解压到指定位置
3. 安装依赖库
~]# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel libffi-devel gcc make mysql-devel openldap python-devel openldap-devel
4. 编译安装
Python-3.7.9]# ./configure --prefix=/usr/local/python3.7.9 --enable-optimizations --enable-shared
Python-3.7.9]# make
Python-3.7.9]# make install