Recently I have started to use
While the other answers to this question are both very valuable and informative, I was looking for a solution similar to that suggested by @Sergey Gornostaev. However, I am on Ubuntu and install most of my Python packages (at least the ones I want available globally) through
apt. That means my packages end up in
site-packages remains empty, so I can't use @Sergey's solution. Instead, I used the solution in this answer.
Basically, I install the packages I want available in all environments through
apt if possible. Then I add the following (or some variation of it) to my
This way all those packages are available, and then I can install indivdual packages sepecifc to a given virtual environment through
pip from within the
virtualenv. It might not be an ideal solution, but it meets my current needs, so this is what I will be using for now.