pip缓存文件夹在哪里? [英] Where is pip cache folder?

查看:56
本文介绍了pip缓存文件夹在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Python pip 缓存文件夹在哪里?我在安装过程中出错,现在使用缓存文件重新安装包.那个目录在哪里?我想备份它们以备将来安装.可能吗?

Where is Python pip cache folder? I had an error during install and now reinstall packages using cache files. Where is that directory? I want to backup them for install in the future. Is it possible?

例如,我有这个

Using cached cssselect-0.9.1.tar.gz

我在谷歌上搜索了这个目录,但我看到的任何东西都是在学习如何从文件夹安装,我想找到默认的缓存目录.还有一个问题,这些缓存文件会留在那个目录中还是很快就会被删除?

I searched google for this directory but anything I saw, is learning how to 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?

推荐答案

这取决于操作系统.

使用 pip 20.1 或更高版本,您可以通过以下方式找到它:

With pip 20.1 or later, you can find it with:

pip cache dir

以 macOS 为例:

For example with macOS:

$ pip cache dir
/Users/hugo/Library/Caches/pip

文档:

这篇关于pip缓存文件夹在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆