Note that what pip caches is not necessarily human readable, and doing
pip cache list
does not necessarily list all the files that have been cached in some fashion. In addition to the .whl files that appear when you ask pip to list the cache, there is an http
directory where network caching is done as well. On linux, it is in ~/.cache/pip/http
. Files there do not appear to be listed when you do pip cache list
If you ask pip to install comm==0.1.3, it will look in the regular cache and when the network request is made, it will look in the network cache under a hashed key. The function _FileCacheMixin.encode() in the file pip/_internal/_vendor/cachecontrol/caches/file_cache.py (in pip version 23.0.1) turns the URL into a key. On my machine, the key is '8856a20c..[etc]' and there is a file ~/.cache/pip/http/8/8/5/6/a/8856a2..[etc]
that is the whl file.
Upon attempting to install comm==0.1.3, pip will report:
Collecting comm==0.1.3
Using cached comm-0.1.3-py3-none-any.whl (6.6 kB)
But pip cache list | grep comm
comes up with nothing. This is a known issue. See: https://github.com/pypa/pip/issues/10460