1、安装依赖文件
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
yum install -y gcc-c++
2、下载python源码包
Python-3.5.5.tgz
3、解压:tar -zxvf Python-3.5.5.tgz
4、python3.5目录配置
./configure
编译安装 make install
5、设置默认版本3.5
mv /usr/bin/python /usr/bin/python2
mv /data/Python355/python /usr/bin/python
6、修改yum为python2
vim /usr/bin/yum
#!/usr/bin/python2