我的linuxbox上有两个版本的python:
$python
Python 2.6.6 (r266:84292, Jul 10 2013, 22:48:45)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
$ /usr/local/bin/python2.7
Python 2.7.3 (default, Oct 8 2013, 15:53:09)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
$ which python
/usr/bin/python
$ ls -al /usr/bin/python
-rwxr-xr-x. 2 root root 4864 Jul 10 22:49 /usr/bin/python
如何将2.7设置为默认版本,以便在键入python
时将其置于2.7版本?
/usr/bin/env python
为2.6,而不是2.3,意味着其中的一半命令rpm
都urpmi
停止了工作)。
/usr/bin/python
是指向的软链接python2
。我只是将其更改为python3.6