I installed virtualenv on my Ubuntu 10.04 server.
Now when I do pip freeze it shows me the following packages:
Django==1.2.4
distribute==0.6.10
python-apt==0.7.94.2ubuntu6.2
virtualenv==1.5.1
wsgiref==0.1.2
When I do "pip uninstall Django" it says:
pip uninstall Django
Uninstalling Django:
Proceed (y/n)? y
Successfully uninstalled Django
Ideally this should uninstall Django but it doesn't. I can still see the same packages when I do "pip freeze".
Now bear with me, the other weird thing is that when I create a virtualenv and then do "pip freeze" inside it, I see only one package and that is "wsgiref" which is weird because it should ideally be blank.
Also, in spite of creating this virtualenv with --no-site-packages I can still create a new django project with "django-admin.py startproject".
When I start python interpreter inside this virtualenv and do "import django" it gives me the error "No module named django".
Also when I try to install "pip install Django" inside the virtualenv it asks for sudo permissions which shouldn't happen ideally.
How do I sort out this mess. Any way to just reset everything pep and virtualenv?
import django
? – Reiner Gerecke Feb 6 '11 at 13:48import django
works outside a virtualenv, doimport django;django.__path__
. This will show the path where django is still installed. – Reiner Gerecke Feb 6 '11 at 16:06toggle-site-packages
will turn off stuff that's not explicitly in your virtualenv, so if a package is installed globally, you can disable it/enable it using this command. – David Boshton Nov 26 '14 at 11:46