[root@localhost bin]# cd /usr/local/bin [root@localhost bin]# ll total 5040 -rwxr-xr-x 1 root root 367 Jan 19 17:45 pip -rwxr-xr-x 1 root root 369 Jan 19 17:45 pip2 -rwxr-xr-x 1 root root 373 Jan 19 17:45 pip2.7 -rwxr-xr-x 1 root root 84 Jan 21 12:26 pydoc -rwxr-xr-x 1 root root 223 Jan 19 17:47 pygmentize lrwxrwxrwx 1 root root 18 Feb 7 13:40 python -> /usr/bin/python2.6 lrwxrwxrwx 1 root root 9 Jan 21 12:28 python2 -> python2.7 -rwxr-xr-x 1 root root 4635628 Jan 21 12:27 python2.7 -rwxr-xr-x 1 root root 1624 Jan 21 12:28 python2.7-config lrwxrwxrwx 1 root root 16 Jan 21 12:28 python2-config -> python2.7-config lrwxrwxrwx 1 root root 14 Jan 21 12:28 python-config -> python2-config -rwxr-xr-x 1 root root 18547 Jan 21 12:26 smtpd.py -rwxr-xr-x 1 root root 97298 Jan 19 22:11 sqlite3 [root@localhost bin]# rm python rm: remove symbolic link `python'? y [root@localhost bin]# ln -s /usr/local/bin/python2.7 /usr/local/bin/python # 改为2.7版本 [root@localhost bin]# python -V Python 2.7.3 [root@localhost bin]# rm python rm: remove symbolic link `python'? y [root@localhost bin]# ln -s /usr/bin/python2.6 /usr/local/bin/python # 改为2.6版本 [root@localhost bin]# python -V Python 2.6.6
记录:为安装Numpy和Scipy,下载了python2.7,并把系统默认的python指向python2.7。但在使用setup配置时,发现网络配置点下去没有反应,报错" No module named snack ",怀疑python版本原因,故将系统默认的python指向python2.6,再将[ ln -s /usr/bin/python2.6 /usr/bin/python ]问题解决。
参考:http://www.cnblogs.com/wnzhong/p/6308669.html