Where is pip cache folder

Where is Python pip cache folder? I had error during install and now reinstall packages using cache files

Where is that directory? I want backup them for install in the future. Is it possible ?

For example I have this one :

    Using cached cssselect-0.9.1.tar.gz

I searched google for this directory but anything I saw, is learn to how install from a folder, I want to find default cache directory.

And another question, these cache files will stay in that directory or will remove soon ?

Because this question ranks, and the accepted answer doesn't quite match the question title:

The default location for the cache directory depends on the Operating System:


~/.cache/pip and it respects the XDG_CACHE_HOME directory.





Wheel Cache

Pip will read from the subdirectory wheels within the pip cache directory and use any packages found there. [snip]


The location of the cache directory can be changed via the command line option --cache-dir.

From: stackoverflow.com/q/34578168