有些服务器的没有python3,可以用yum快速安装
yum install epel-release
yum install python3
也可以下载python源码安装,不过需要先安装依赖
yum install gcc patch libffi-devel python3-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y
然后去python官网下载源码
wget https://www.python.org/ftp/python/...python3.tar.xz (这里根据需要去找对应的版本源码包)
然后解压,编译,安装,和其他源码安装步骤一样就不写了。