I'm running a Virtualenv like this:
$ virtualenv --no-site-packages venv
New python executable in .../venv/bin/python
Installing setuptools, pip, wheel...done.
$ source venv/bin/activate
But when I pip freeze -l
, I don't get anything. So I double-checked my PYTHONPATH:
$ python
import sys
for i in sys.path:
... print i
Which gave this output:
/home/...
/usr/local/lib/python2.7/site-packages
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/site-packages
/usr/lib/python2.7/dist-packages
/home/.../venv/lib/python2.7
/home/.../venv/lib/python2.7/plat-x86_64-linux-gnu
/home/.../venv/lib/python2.7/lib-tk
/home/.../venv/lib/python2.7/lib-old
/home/.../venv/lib/python2.7/lib-dynload
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/home/.../venv/local/lib/python2.7/dist-packages
/home/.../venv/lib/python2.7/site-packages
/home/.../venv/local/lib/python2.7/dist-packages
In the directories, I used ...
to denote the path to my project/working directory.
It seems to me that what I really need to do is ensure that in my virtual environment, the /usr/
paths don't show up. But how can I do that? How do I clear these extraneous paths?