centos 安装python3
GraPower
9年前
来自: http://my.oschina.net/snake12581/blog/624776
1、从python官网上下载最新的python3版本
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
2、解压tar包
tar -zxvf Python-3.5.1.tgz
3、创建python3的安装目录(需要切换至root用户)
mkdir /opt/python3.5
4、编译安装python
./configure --prefix=/opt/python3.5
make
sudo make install
5、创建python3的链接
sudo ln -s /opt/python3.5/bin/python3.5 /usr/local/bin/python3
6、测试
python3 -V 显示python版本为3.5.1