Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install Django on Ubuntu 11.10?

I'm using The Definitive guide to installing Django on ubuntu and ironically need something more definitive because I can't make it work.

(I have followed the steps before this on the link above)

Here is my situation/standstill:

drewverlee@ubuntu:/var/src$ tar xzvf Django-1.3.1.tar.gz
tar (child): Django-1.3.1.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

So it tells me there is no file Django-1.3.1.tar.gz? I think I can check for a file by us by:

drewverlee@ubuntu:/var/src$ ls
index.html  index.html.1
drewverlee@ubuntu:/var/src$

What do I need to do?

like image 792
Drew Verlee Avatar asked Mar 04 '12 19:03

Drew Verlee


2 Answers

pip is best tool for installing python packages. Here is link to install setup-tools and pip on ubuntu.

If you have installed pip then it will be very easy to install django and other python packages.

$ sudo pip install django

or for a specific version of django

$ sudo pip install django==1.3.1
like image 171
Zubair Afzal Avatar answered Oct 19 '22 13:10

Zubair Afzal


If you're using ubuntu, then you can just use the package provided in the repositories:

$ sudo apt-get install python-django
...
$ python -c 'import django; print django.get_version()'
1.3
like image 27
jcollado Avatar answered Oct 19 '22 13:10

jcollado