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 vir
Your problem is that you've installed requirements with sudo and they were installed in your system python library folder instead and not in your virtual environment's venv
library.
What to do? Run the same command but this time without sudo: pip install -r requirements.txt
. This will run pip from the virtual environment and install packages to the right place.
When you activate a virtual environment e.q with source path/to/my/venv/bin/acivate
the path variable $PATH
of your current user is updated and then when you run something with sudo, this new $PATH that you've just updated when activating the virtual environment is no longer the same. Same thing happens when you open a new shell window or logs in as a different user with su
or running sudo
, $PATH
variable is not a global system one.