Centos快速安装Python3

wget --no-check-certificate https://raw.githubusercontent.com/LunacyZeus/Python3.6-for-Centos7.0/master/install.sh && sh install.sh

 

安装完成后备份原先的python文件夹

mv /usr/bin/python /usr/bin/python_bak

 

建立软连接使得默认Python为Python3

sudo ln -s  /usr/local/bin/python3 /usr/bin/python

 

yum出现except KeyboardInterrupt, e:错误则修改文件

sudo vi /usr/bin/yum

将#!/usr/bin/python改为#!/usr/bin/python2.7

 

另外还需要修改

vim /usr/libexec/urlgrabber-ext-down

将/usr/bin/python改为/usr/bin/python2.7。

 

你可能感兴趣的:(网页开发)