我在中有python3.2 /usr/lib/python3.2
。我不确定这是否已安装,但我认为现在已经安装了。
关于我的系统的一些事实:
$ which python
/usr/local/bin/python
当我输入python
终端时,我得到以下内容
$ python
Python 2.7.2 (default, Dec 19 2011, 11:12:13)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
然后找到我要做的道路
>>> sys.info
>>> sys.path
['', '/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/usr/local/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg', '/usr/local/lib/python2.7/site-packages/PIL-1.1.7-py2.7-linux-x86_64.egg', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages']
因此,了解了所有这些信息后,如何将默认系统python从2.7.2更改为3.2?
/usr/bin/env python
是您想要的。因此,手动键入python3
不是解决方案。