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
 
参考
posted @ 2018-10-25 10:44  不经一番寒彻骨  阅读(122)  评论(0编辑  收藏  举报