1、安装工具
sudo yum groupinstall "Development tools"
sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-develtk-devel gdbm-devel db4-devel libpcap-devel xz-devel
2、下载python3
3、下载完后对压缩包解压缩
tar -xvf Python-3.6.2.tar.xz
4、进入解压缩完后的文件夹
cd Python-3.6.2
5、 配置
./configure
6、编译
sudo make
7、安装
sudo make install