Installing Django on Ubuntu
If you want to install Django by creating a virtual environment, follow this tutorial instead.
Assumption: There is no older version of Django that is currently installed in the system. If there is, click here.
You can install Django using the packages from the Ubuntu repositories. However, this tutorial is all about installing Django using the archives from the official website.
We will be using the terminal. As of this writing, the latest version is Django 1.3.1. First, download the archive.
Now, extract the archive.
tar xzvf Django-1.3.1.tar.gz
Go inside the newly created directory:
sudo python setup.py install
Wait for the installation to finish. If you are planning to use MySQL as your database, you might want to install the python-mysqldb package to allow the communication between Python and MySQL.
sudo apt-get install python-mysqldb
To verify whether the installation was successful or not, start the interactive mode of python by issuing the “python” command and try the following codes:
>>> import django >>> print django.get_version() 1.3.1
That’s it. It’s time to move to the tutorials.