今のローカルマシンには1.4.xが入っている。
Djangoをアップグレードするには,インストールと同じ手順で--upgradeオプションを付けるのみ。
sudo pip install Django --upgrade
以下の様な結果が出てくるはず。
Downloading/unpacking Django from https://pypi.python.org/packages/source/D/Django/Django-1.5.1.tar.gz#md5=7465f6383264ba167a9a031d6b058bff
Downloading Django-1.5.1.tar.gz (8.0MB): 8.0MB 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.2
Uninstalling Django:
Successfully uninstalled Django
Running setup.py install for Django
changing mode of build/scripts-2.7/django-admin.py from 644 to 755
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
changing mode of /usr/local/bin/django-admin.py to 755
========
WARNING!
========
You have just installed Django over top of an existing
installation, without removing it first. Because of this,
your install may now include extraneous files from a
previous version that have since been removed from
Django. This is known to cause a variety of problems. You
should manually remove the
/Library/Python/2.7/site-packages/django
directory and re-install Django.
Successfully installed Django
Cleaning up...
そして、以下のコマンドでアップグレードされたバージョンをチェックできる。
>>> import django
>>> quit()
No comments:
Post a Comment