Centos 7安装Python3.6
1> 安装python3.6可能使用的依赖
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
2> 到python官网找到下载路径, 用wget下载
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
3> 解压tgz包
tar -zxvf Python-3.6.4.tgz
4> 把python移到/usr/local下面
mv Python-3.6.4 /usr/local
5> 删除旧版本的python依赖
ll /usr/bin | grep python
rm -rf /usr/bin/python
6> 进入python目录, 编译文件并安装python
cd /usr/local/Python-3.6.4/
./configure
make
make install
7> 创建新的软链接到最新的python
ln -s /usr/local/bin/python3.6 /usr/bin/python
python -V
Python 3.6.4