【发布时间】:2014-10-23 03:46:12
【问题描述】:
我正在尝试在 virtualenv 中升级我的 django 版本,它显示 django 已更新但仍未更新。
D:\testEnv>tan\Scripts\activate.bat
(tan) D:\testEnv>pip freeze
BeautifulSoup==3.2.1
Django==1.4.3
distribute==0.6.15
django-export-xls==0.1.1
jdcal==1.0
openpyxl==2.0.4
pypm==1.3.4
pythonselect==1.3
pywin32==214
virtualenv==1.6.1
wsgiref==0.1.2
xlwt==0.7.5
(tan) D:\testEnv>pip install Django --upgrade
Downloading/unpacking Django
Downloading Django-1.7.1.tar.gz (7.5Mb): 7.5Mb downloaded
Running setup.py egg_info for package Django
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
Installing collected packages: Django
Found existing installation: Django 1.4.3
Not uninstalling Django at c:\python27\lib\site-packages, outside environment D:\testEnv\tan
Running setup.py install for Django
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
Installing django-admin-script.py script to D:\testEnv\tan\Scripts
Installing django-admin.exe script to D:\testEnv\tan\Scripts
Successfully installed Django
Cleaning up...
(tan) D:\testEnv>pip freeze
BeautifulSoup==3.2.1
Django==1.4.3
distribute==0.6.15
django-export-xls==0.1.1
jdcal==1.0
openpyxl==2.0.4
pypm==1.3.4
pythonselect==1.3
pywin32==214
virtualenv==1.6.1
wsgiref==0.1.2
xlwt==0.7.5
(tan) D:\testEnv>python
ActivePython 2.7.2.5 (ActiveState Software Inc.) based on
Python 2.7.2 (default, Jun 24 2011, 12:21:10) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> dir(django)
['VERSION', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', 'get_version']
>>> django.get_version
<function get_version at 0x022F7AB0>
>>> django.get_version()
'1.4.3'
>>>
由于我的 django 旧版本是 1.4.1,升级后它应该是 1.7.1 并且它显示消息 Successfully installed Django 但仍然显示旧版本的 django。 那么我应该如何在这里更新我的 django 版本。另外,我需要帮助来更新 django 版本 1.6.1。
【问题讨论】:
标签: python django virtualenv