I was wondering if there is an approach to have some packages, e.g. the ones you use in most projects, installed globally … Other things would go in local virtualenv-folders
Yes, virtualenv supports this. Install the globally-needed packages globally, and then, whenever you create a virtualenv, supply the --system-site-packages
option so that the resulting virtualenv will still be able to use globally-installed packages. When using tox, you can set this option in the created virtualenvs by including sitepackages=true
in the appropriate [testenv]
section(s).