- Cached is: store away in hiding or for future use
- Used for
- store the installation files(
.whl
, etc) of the modules that you install through pip - store the source files (
.tar.gz
, etc) to avoid re-download when not expired
- Possible Reason you might want to disable cache:
- you don’t have space on your hard drive
- previously run
pip install
with unexpected settings- eg:
- previously run
export PYCURL_SSL_LIBRARY=nss
andpip install pycurl
- want new run
export PYCURL_SSL_LIBRARY=openssl
andpip install pycurl --compile --no-cache-dir
- previously run
- eg:
- you want to keep a Docker image as small as possible
Links to documentation
https://pip.pypa.io/en/stable/reference/pip_install/#caching – @emredjan
https://pip.pypa.io/en/stable/reference/pip_install/ – @mikea