1 安装python3.6
步骤:1)下载Python-3.6.0.tgz包;
2)解压 tar xf Python-3.6.0.tgz
3)切到目录cd Python-3.6.0
4)设置一下配置文件,准备编译安装 ./configure prefix=/usr/local/python3
5)下一步 yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel kernel-devel libffi-devel
6)编译安装:make && make install
7)设置软链接:ln -s /usr/local/python3/bin/python3 /usr/bin/python3
查看安装结果 python3 -V
非root用户chmod 755 /etc/profile.d/python.sh,更新配置