wget http://python.org/ftp/python/2.7.8/Python-2.7.8.tgz

            [root@localhost ~]# tar zxvf Python-2.7.8.tgz

            [root@localhost Python-2.7.8]# ./configure  --prefix=/usr/local/python27

            [root@localhost Python-2.7.8]# make && make install

            [root@localhost Python-2.7.8]# ln -s /usr/local/python27/bin/py

            [root@localhost Python-2.7.8]# ln -s /usr/local/python27/bin/python /usr/bin/

            [root@localhost Python-2.7.8]# python -V

                Python 2.7.8

           解决yum的Python版本问题

            [root@localhost Python-2.7.8]# vim /usr/bin/yum 

              #!/usr/bin/python2.6               Python2.6版本位置

            [root@localhost Python-2.7.8]# yum

            Loaded plugins: fastestmirror

            You need to give some command

            Usage: yum [options] COMMAND

            List of Commands:

            check          Check for problems in the rpmdb

            check-update   Check for available package updates

            clean          Remove cached data

            deplist        List a package's dependencies

            synchronization Synchronize installed packages to the latest available versions

            downgrade      downgrade a package

            erase          Remove a package or packages from your system

         wKioL1bGfmrx9yrDAAAuz9bhGzo560.jpg