Django升级成功,然后恢复

时间:2011-04-18 16:00:33

标签: python django

我的django版本是1.1

rgross@fun:~$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> print django.VERSION
(1, 1, 1, 'final', 0)
>>> quit()
rgross@fun:~$ 

所以,我upgrade to the latest version

gross@fun:/tmp/Django-1.3$ sudo python setup.py install
running install
running build
running build_py
running build_scripts
running install_lib
running install_scripts
changing mode of /usr/local/bin/django-admin.py to 755
running install_data
running install_egg_info
Removing /usr/local/lib/python2.6/dist-packages/Django-1.3.egg-info
Writing /usr/local/lib/python2.6/dist-packages/Django-1.3.egg-info
rgross@fun:/tmp/Django-1.3$ 

再次检查版本,并取得巨大成功,我得到了django 1.3

rgross@fun:/tmp/Django-1.3$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> print django.VERSION
(1, 3, 0, 'final', 0)

但是,当我打开一个新的终端窗口并检查版本时,我发现我的版本升级不是持久性的,并且新终端看到版本1.1!

知道发生了什么事吗?

1 个答案:

答案 0 :(得分:3)

问题是因为我还通过apt-get安装了django。

要解决:

sudo apt-get remove python-django