only run pip if there is a virtualenv currently activated and cache pip-installed packages