1、安装依赖包
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc* make -y
2、下载python安装包
wget https: //www.python.org /ftp/python /3.5.2/Python- 3.5. 2.tar.xz
这里下载安装python3.5.2的原因主要是由于后期结合Django的稳定性好
3、解压python安装包
tar -Jxvf Python-3 .5 .2 .tar .xz
4、配置安装路径
切入到解压目录下
. /configure prefix=/usr /local/python3