script / python / python 2.7

s

tar –xvf Python-2.7.12.tar

cd Python-2.7.12

./configure

make

make install

/usr/local/bin/python2.7 -V

mv /usr/bin/python /usr/bin/python2.6
ln -s /usr/local/bin/python2.7 /usr/bin/python
防止yum执行异常,修改yum使用的Python版本
vi /usr/bin/yum
将头部 #!/usr/bin/python 修改为 #!/usr/bin/python2.6

end

原文地址:https://www.cnblogs.com/lindows/p/13131674.html