升级python到2.7

tar xvf Python-2.7.2.tar.bz2

./configure --prefix=/usr/local/python27
make
make install

mv /usr/bin/python /usr/bin/python_old
ln -sv /usr/local/python27/bin/python2.7 /usr/bin/ python
ln -sv  /usr/local/python27/bin/python2.7 /usr/bin/
vim /usr/bin/yum 
将 #!/usr/bin/python 改为 #!/usr/bin/python2.4
python #检查版本

你可能感兴趣的:(python,升级)