1、安装依赖
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel gcc libffi-devel -y
2、下载python包
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
3、解压、编译
tar xf Python-3.6.4.tgz -C /usr/local/ cd /usr/local/Python-3.6.4 ./configure make && make install
4、验证新版本python
[root@zabbix-server local]# python3 -V Python 3.6.4