Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
OSError: [Errno 13] Permission denied: '/usr/share/pyshared/Django-1.4.1.egg-info'

Storing complete log in /home/lightning/.pip/pip.log
OS: Ubuntu 12.10 32 bit 2GB RAM

Trying to install this via tutorial returns this error.

share|improve this question
Which tutorial? What commands did you run? – Eric Carvalho Mar 17 '13 at 21:31 – lightning Mar 17 '13 at 21:32
pip install Django==1.5 is the command I used – lightning Mar 17 '13 at 21:33
You need sudo to write to /usr/share – RobotHumans Mar 17 '13 at 21:34
how do I do that? – lightning Mar 17 '13 at 21:34
up vote 3 down vote accepted
sudo rm -rf /usr/lib/python2.7/dist-packages/django
sudo pip install Django==1.5
share|improve this answer
lightning@rigel5:~$ sudo rm -rf /usr/lib/python2.7/dist-package/django lightning@rigel5:~$ sudo pip install Django==1.5 Requirement already satisfied (use --upgrade to upgrade): Django==1.5 in /usr/local/lib/python2.7/dist-packages Cleaning up... – lightning Mar 17 '13 at 21:48
I guess this worked.. would like to confirm before admitting victory on this one – lightning Mar 17 '13 at 21:49
>>> import django >>> print(django.get_version()) 1.5 its official. declaring victory. Eric, you da man. ty – lightning Mar 17 '13 at 21:53
I think it's properly installed. Make a test to verify if it works. – Eric Carvalho Mar 17 '13 at 21:53
yup it was safely imported into the interpreter and returned the correct version. Thanks again Eric. Now, to glue my hair back in ;) – lightning Mar 17 '13 at 21:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.