5

I have to delete a python module named "django" (a popular one), because I installed the wrong version (1.3 - beta in py-2.6).

How to uninstall this module?
Please explain, because I've used python only in Windows and never in Ubuntu.

Pindatjuh
  • 10,413
  • 1
  • 39
  • 66
VoodooChild92
  • 1,823
  • 3
  • 18
  • 24
  • How did you install it in the first place? – Blair May 11 '11 at 05:27
  • I installed it according to the instructions in the django site – VoodooChild92 May 11 '11 at 05:28
  • 1
    You shouldn't install stuff in Ubuntu/Debian globally using anything other than `apt` unless it's in a controlled location like /usr/local/. If you do want a specific version of Django not in the repositories, you should use virtualenv and install it locally. – Noufal Ibrahim May 11 '11 at 05:55

2 Answers2

10

go to the python shell

 >> import django
 django.__path__

copy the path

on the shell

 sudo  rm -r path 
mossplix
  • 3,677
  • 2
  • 24
  • 30
1
sudo aptitude install python-pip
sudo pip install django --upgrade
lprsd
  • 80,809
  • 47
  • 132
  • 167
  • No this is not recommended at all! It create a new django that contains the old version of django inside – c24b Jan 03 '14 at 07:07