赞
踩
以CentOS为例子:
yum install wget
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
cd /usr/local/src
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar -zxf /usr/local/src/Python-3.6.0.tgz && cd Python-3.6.0
mkdir /usr/local/python3
./configure --prefix=/usr/local/python3
make && make altinstall
# 关键一步,建立链接
ln -s /usr/local/python3/bin/python3.6 /usr/bin/python3 # 可直接使用 "python3"
ln -s /usr/local/python3/bin/pip3.6 /usr/bin/pip3 # 可直接使用 "pip3"
# 最后测试下
python3
pip3
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。