I'm using virtualenv
and pip
on Debian Wheezy. I'm having an odd problem where packages appear to install OK, but then aren't visible in the virtualenv.
This is my requirements.txt
file:
Django==1.7.7
psycopg2==2.5.4
django-geojson==2.6.0
If I install it with pip
from inside my virtualenv, it says everything has been installed:
(.venv)$ sudo pip install -r requirements.txt
Requirement already satisfied (use --upgrade to upgrade): Django==1.7.7 in /usr/local/lib/python2.7/dist-packages (from -r requirements/base.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): psycopg2==2.5.4 in /usr/local/lib/python2.7/dist-packages (from -r requirements/base.txt (line 2))
Requirement already satisfied (use --upgrade to upgrade): django-geojson==2.6.0 in /usr/local/lib/python2.7/dist-packages (from -r requirements/base.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): six in /usr/local/lib/python2.7/dist-packages (from django-geojson==2.6.0->-r requirements/base.txt (line 3))
Cleaning up...
But then if I do pip freeze
to check what is installed, it looks like pip
thinks I have a completely different set of packages, and in particular it doesn't see djgeojson
there:
(.venv)$ pip freeze
Django==1.7.4
argparse==1.2.1
coverage==3.7.1
distribute==0.6.24
django-debug-toolbar==1.2.1
gunicorn==19.3.0
psycopg2==2.5.4
requirements==0.1
setproctitle==1.1.8
sqlparse==0.1.14
wsgiref==0.1.2
And if I fire up a Python terminal, Python can't see djgeojson
.
Why is this happening? It is quite confusing.