1.安装依赖环境
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
如果找不到wget命令,输入yum -y install wget安装其依赖将会被安装
2.下载python安装包
wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
3.解压python安装包
tar -zxvf Python-3.7.1.tgz
4.编译安装之前需要安装编译器
yun install gcc
5.py3.7版本之后需要一个新的包libffi-devel
yum install libffi-devel -y
6../configure --prefix=/usr/local
7.make
8.make install
9.检查python3及pip3是否正常可用