#### 下载Python安装包
cd /usr/local/src
#### 编译时要提前装好gcc编译器和zlib zlib-devel
1、下载文件
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
2、解压
tar -zxvf Python-3.6.0.tgz
3、进入解压目录
cd Python-3.6.0
4、编译安装包
./configure --prefix=/usr/local/python
make
make install
5、添加环境变量
echo PATH='/usr/local/python/bin/:$PATH' >> /etc/profile
source /etc/profile
6、检查是否成功,执行下面代码
python3.6 -V