centos下python2.6升级到python3.5
时间:2015-11-25 20:17 来源:51cto.com 作者:IT
yum install gcc gcc-c++ zlib-devel
1、下载python3.5
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
tar zxvf Python-3.5.0.tgz
cd Python-3.5.0
./configure --prefix=/usr/local/python3.5
make
make install
2、下载并安装setuptools 18.5
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
3、备份原有python命令执行文件
mv /usr/bin/python /usr/bin/pythonbak
4、创建新python软连接
ln -s /usr/local/python3.5/bin/python3.5 /usr/bin/python
5、查看python版本
[root@centos ~]# python
Python 3.5.0 (default, Nov 21 2015, 13:47:09)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
6、修改yum配置文件
(责任编辑:IT)
yum install gcc gcc-c++ zlib-devel
1、下载python3.5 wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz tar zxvf Python-3.5.0.tgz cd Python-3.5.0 ./configure --prefix=/usr/local/python3.5 make make install
2、下载并安装setuptools 18.5 wget https://bootstrap.pypa.io/ez_setup.py -O - | python
3、备份原有python命令执行文件 mv /usr/bin/python /usr/bin/pythonbak 4、创建新python软连接 ln -s /usr/local/python3.5/bin/python3.5 /usr/bin/python 5、查看python版本
6、修改yum配置文件 (责任编辑:IT) |