Why pip install don't cache packages?
See original GitHub issueHi,
With the following environment:
$ pip --version pip 20.0.2 from /home/werner/.pyenv/versions/3.8.1/envs/test1/lib/python3.8/site-packages/pip (python 3.8)
Tested with the following steps:
(test1) werner@ubuntu-01:~$ pip install six
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting six
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/65/eb/1f97cb97bfc2390a276969c6fae16075da282f5058082d4cb10c6c5c1dba/six-1.14.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: six
Successfully installed six-1.14.0
(test1) werner@ubuntu-01:~$ pip uninstall six
Found existing installation: six 1.14.0
Uninstalling six-1.14.0:
Would remove:
/home/werner/.repo/github.com/pyenv/versions/linux-x86_64/3.8.1/envs/test1/lib/python3.8/site-packages/six-1.14.0.dist-info/*
/home/werner/.repo/github.com/pyenv/versions/linux-x86_64/3.8.1/envs/test1/lib/python3.8/site-packages/six.py
Proceed (y/n)? y
Successfully uninstalled six-1.14.0
(test1) werner@ubuntu-01:~$ pip install six
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting six
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/65/eb/1f97cb97bfc2390a276969c6fae16075da282f5058082d4cb10c6c5c1dba/six-1.14.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: six
Successfully installed six-1.14.0
As you can see, when I run ``pip install’’ for the second time, it will re-downloading the package instead of using the local cache.
And I also cannot find the downloaded package at the following location:
(test1) werner@ubuntu-01:~$ find ~/.cache/pip -type f -name 'six-1.14.0-py2.py3-none-any.whl'
(test1) werner@ubuntu-01:~$
Any hints?
Regards
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:20 (11 by maintainers)
Top Results From Across the Web
pip uses incorrect cached package version, instead of the user ...
pip install --no-cache-dir <package> : install a package without using the cache, for just this run. · pip config set global.no-cache-dir false :...
Read more >Caching - pip documentation v22.3.1
It is, however, recommended to NOT disable pip's caching unless you have caching at a higher level (eg: layered caches in container builds)....
Read more >Pip Clear Cache - Linux Hint
If you want to install a package without looking up the file in the pip cache, we can use the –no-cache-dir. ... The...
Read more >Removing pip's cache? - Intellipaat Community
If you want to force pip to clear out its download cache and use the specific version you can do by using --no-cache-dir...
Read more >The purpose of pip's `--no-cache-dir` option | bobbyhadz
HTTP responses - pip first checks its local cache to determine if it has a suitable response stored locally that hasn't expired. ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So, to summarise, @hongyi-zhao’s remains the only occurance of this bug appearing. Neither of the other two reports are related, and they should be reported and triaged separately. Feel free to open new issues for them, but I’m going to put the awaiting response label back on this one since we still don’t have a working reproduction.
Bot was looking for a response from someone else. 😃