Reputation: 8601
I have just moved my django application to another server, which I have configured a long time ago, so I'm not really sure what's installed and configured. When running the application, I started getting weird errors, which pointed to running an old version of django. Hence, I decided to check the version.
First, I ran:
python -c "import django; print(django.get_version())"
which showed version 1.3.1. So then I did
sudo easy_install --upgrade django
which ran fine, but when running the first command again, it still shows 1.3.1, so I decided to do:
django-admin.py version
and this returned 1.6.5. Therefore, I assume that I have installed the latest django version, but for some reason python is using 1.3.1.
How can I get python to use the latest version of django?
Upvotes: 0
Views: 391
Reputation: 9285
Firstly do not use easy_install
but pip
:
easy install pip
Try to install/update from pip
:
pip install django --upgrade
If it fails, try to uninstall and after réinstall:
pip uninstall django
Be careful if you've installed django with Ubuntu's apt-get
. It's a bad thing to mix system and python installers. Uninstall from apt-get
if it's the case:
apt-get remove python-django
Upvotes: 3