Skip to content

Instantly share code, notes, and snippets.

@macagua
Last active March 30, 2022 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macagua/a365ef25212e151e79bee213197ed0fb to your computer and use it in GitHub Desktop.
Save macagua/a365ef25212e151e79bee213197ed0fb to your computer and use it in GitHub Desktop.
Tip for set the Cache Directory for Python Packages with PIP

TIP: When there is Internet latency and requires installing python packages by a requeriments file of pip but the installation failed, then you can prevent PIP from re-downloading previously downloaded packages, running this command:

mkdir -p ~/.cache/pip && mkdir ~/.pip && printf '[global]\ndownload_cache = ~/.cache/pip\n' >> ~/.pip/pip.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment