centos7 安装python3.6
准备编译环境
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
下载python
wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tgz
tar -zxvf Python-3.6.6.tgz
安装
cd Python-3.6.6
./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
参考