Python pip 缓存文件夹在哪里?我在安装过程中出错,现在使用缓存文件重新安装包。那个目录在哪里?我想备份它们以备将来安装。有可能吗?
比如我有这个
Using cached cssselect-0.9.1.tar.gz
我在 google 上搜索过这个目录,但没有看到,正在学习如何从文件夹安装,我想找到默认的缓存目录。
还有一个问题:这些缓存文件会保留在那个目录中,还是会很快被删除?
最佳答案
The default location for the cache directory depends on the Operating System:
Unix
~/.cache/pip and it respects the XDG_CACHE_HOME directory.
macOS
~/Library/Caches/pip
Windows
<CSIDL_LOCAL_APPDATA>\pip\Cache
Wheel Cache
pip will read from the subdirectory wheels within the pip cache directory and use any packages found there. [snip]
https://pip.pypa.io/en/latest/reference/pip_install/#caching
缓存目录的位置可以通过命令行选项--cache-dir
来改变.
关于python - pip缓存文件夹在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34578168/