[root@localhost Python-2.7.5]# python Python 2.4.3 (#1, Jun 11 2009, 14:09:58) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
只需做个软连接即可
[root@localhost bin]# ln -s /usr/local/bin/python2.7 /usr/bin/python
[root@localhost bin]# python Python 2.7.5 (default, Oct 3 2013, 15:06:47) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
hon