一、安装依赖
yum -y groupinstall
"Development tools"
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 (3.7以上需要libffi-devel)
二、获取安装包 编译安装
wget https:
//www
/ftp/python/3
.6.4
/Python-3
tar
.xz
tar
-xvJf
tar
.xz
cd
.
/configure
--prefix=
/usr/local/python3
make
&&
make
install
三、创建软连接
ln
-s
/usr/local/python3/bin/python3
/usr/bin/python3
ln
-s
/usr/local/python3/bin/pip3
/usr/bin/pip3