1.安装python3.5可能使用的依赖
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel -y
2.到python官网找到下载路径, 用wget下载
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
3.解压tgz包
tar -zxvf Python-3.5.1.tgz
4把python移到/usr/local下面
mv Python-3.5.1 /usr/local
5进入python目录
cd /usr/local/Python-3.5.1/
配置安装
./configure && make && make install
6. ln -s /usr/local/bin/python3.5 /usr/bin/python3.5
参考: https://blog.csdn.net/wgy901/article/details/81050163