- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.2k
Closed
Labels
type: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behavior
Description
Description
pip reports "Number of wheels: 0" and "Nothing cached" even when things are obviously cached, as evidenced by "Using cached ...".
This was previously discussed at #7890, where after some time @uranusjr appears to understand the issue and says
please open a new issue for discussion.
I don't think a new issue was ever opened, so I'm doing that now.
Other relevant comments on that issue are
- Why pip install don't cache packages? #7890 (comment) the same issue
- Why pip install don't cache packages? #7890 (comment) the same issue
- Why pip install don't cache packages? #7890 (comment) the current texts are perhaps technically correct, but as evidenced by this comment not even understandable by pip maintainers.
- Why pip install don't cache packages? #7890 (comment) an explanation of the root cause
pip version
20.3.4
Python version
3.9
OS
Ubuntu
How to Reproduce
/tmp$ python -m venv pip-cache-broken
/tmp$ . pip-cache-broken/bin/activate
(pip-cache-broken) /tmp$ mkdir /tmp/broken-cache-dir
(pip-cache-broken) /tmp$ pip install requests --cache-dir=/tmp/broken-cache-dir
Collecting requests
  Downloading requests-2.28.1-py3-none-any.whl (62 kB)
     |████████████████████████████████| 62 kB 1.4 MB/s 
Collecting charset-normalizer<3,>=2
  Downloading charset_normalizer-2.1.0-py3-none-any.whl (39 kB)
Collecting certifi>=2017.4.17
  Downloading certifi-2022.6.15-py3-none-any.whl (160 kB)
     |████████████████████████████████| 160 kB 9.6 MB/s 
Collecting urllib3<1.27,>=1.21.1
  Downloading urllib3-1.26.10-py2.py3-none-any.whl (139 kB)
     |████████████████████████████████| 139 kB 9.5 MB/s 
Collecting idna<4,>=2.5
  Downloading idna-3.3-py3-none-any.whl (61 kB)
     |████████████████████████████████| 61 kB 7.4 MB/s 
Installing collected packages: urllib3, idna, charset-normalizer, certifi, requests
Successfully installed certifi-2022.6.15 charset-normalizer-2.1.0 idna-3.3 requests-2.28.1 urllib3-1.26.10
(pip-cache-broken) /tmp$ pip cache info --cache-dir=/tmp/broken-cache-dir
Package index page cache location: /tmp/broken-cache-dir/http
Package index page cache size: 520 kB
Number of HTTP files: 10
Wheels location: /tmp/broken-cache-dir/wheels
Wheels size: 0 bytes
Number of wheels: 0
(pip-cache-broken) /tmp$ pip cache list --cache-dir=/tmp/broken-cache-dir
Nothing cached.
$ pip install requests --force-reinstall --cache-dir=/tmp/broken-cache-dir
Collecting requests
  Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting charset-normalizer<3,>=2
  Using cached charset_normalizer-2.1.0-py3-none-any.whl (39 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.10-py2.py3-none-any.whl (139 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.6.15-py3-none-any.whl (160 kB)
Installing collected packages: urllib3, idna, charset-normalizer, certifi, requests
  Attempting uninstall: urllib3
    Found existing installation: urllib3 1.26.10
    Uninstalling urllib3-1.26.10:
      Successfully uninstalled urllib3-1.26.10
  Attempting uninstall: idna
    Found existing installation: idna 3.3
    Uninstalling idna-3.3:
      Successfully uninstalled idna-3.3
  Attempting uninstall: charset-normalizer
    Found existing installation: charset-normalizer 2.1.0
    Uninstalling charset-normalizer-2.1.0:
      Successfully uninstalled charset-normalizer-2.1.0
  Attempting uninstall: certifi
    Found existing installation: certifi 2022.6.15
    Uninstalling certifi-2022.6.15:
      Successfully uninstalled certifi-2022.6.15
  Attempting uninstall: requests
    Found existing installation: requests 2.28.1
    Uninstalling requests-2.28.1:
      Successfully uninstalled requests-2.28.1
Successfully installed certifi-2022.6.15 charset-normalizer-2.1.0 idna-3.3 requests-2.28.1 urllib3-1.26.10
Code of Conduct
- I agree to follow the PSF Code of Conduct.
Metadata
Metadata
Assignees
Labels
type: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behavior