Last Updated: February 25, 2016
· alvarogarcia7

Caching pip requirements to disk

When you type

pip install -r requirements.txt

Everything gets redownloaded everytime from the net. That's slow :)

As found on here: stack overflow, pointing to the original author, the solution is this:

set the variable PIP_DOWNLOAD_CACHE. I've decided to put it in ~/.virtualenvs/pip_cache like this:

export PIP_DOWNLOAD_CACHE=~/.virtualenvs/pip_cache