一、安装python3.6
①安装依赖
yum -y groupinstall "Development tools"
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel gcc gcc-c++ -y
②下载安装包:https://www.python.org/downloads/release/python-368/
③上传到Linux上并解压
tar -zxvf Python-3.6.8.tgz
cd Python-3.6.8
④编译
./configure --prefix=/usr/local/python3
⑤安装
make && make install
⑦建立软链接
ln -s /usr/local/python3/bin/python3.6 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.6 /usr/bin/pip3
⑧查看python3与pip3版本
python3
pip3 -V
以上python3.6安装成功。