Appears to be installing Django 1.3.1 in Ubuntu 12.04. How can I get Django 1.6 installed?
sudo apt-get install python-django
Appears to be installing Django 1.3.1 in Ubuntu 12.04. How can I get Django 1.6 installed?
sudo apt-get install python-django
While you can install it manually (
setup.py
), I recommend using the Python package manager as it is easier to install, maintain and upgrade.Install Pip, the Python package manager.
Optionally, but recommended, upgrade
pip
, using itself:Install the latest stable version of Django:
This installs 1.6.2 at the time of writing(check here the latest pypi version).
To install a specific version, add a requirement specifier like this:
Note that APT, the Debian/Ubuntu package management will still report the older version installed and it is still installed as well. APT installs in dist-packages paths while Pip installs in the site-packages paths. The latter takes precedence, so that's locally installed packages will be chosen. See also: What's the difference between dist-packages and site-packages?
First remove the previously installed django 1.3.1 version by deleting the
django
folder inside/usr/local/lib/pythonx.x/dist-packages
(x.x denotes the version of python).Then follow the below steps,Download Django 1.6 from here.
Open the terminal and move to the directory where you placed the
Django 1.6
.cd path/to/driectory/which/contains/django1.6.tar.gz
Extract the
django1.6.tar.gz
by running the below command.tar -xzvf Django-1.6.tar.gz
Move to the
Django-1.6
directorycd Django-1.6
Run the below command to install
Django-1.6
sudo python setup.py install