安装依赖yum install xz wget gcc make gdbm-devel openssl-devel sqlite-devel zlib-devel bzip2-devel -y下载源码:wget -c https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz备份Python2的环境mv /usr/bin/python /usr/bin/python_bak编译安装3:tar zxvf Python-3.6.2.tgzcd P