Python的 - 哎呦 - 安装python2.6的,当我有2.7 - 默认是现在2.6 -

2019-10-16 23:21发布

我在Ubuntu 11.10。 我安装python2.6的becuased我有一个virtualenv中工作。

在命令行,当我开始蟒蛇,默认是python2.6的。

which python
/usr/local/bin/python

Python 2.6.8 (unknown, Jul  4 2012, 09:17:51) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

如何更改回python2.7默认?

Answer 1:

在这个地方检查蟒蛇:

/usr/bin/python

它应该是你原来的Python 2.7,或者您也可以通过找到python2.7:

ls /usr/bin | grep python


文章来源: Python - whoops - installed Python2.6 when I have 2.7 - default is now 2.6 - want 2.7 back
标签: python linux