虚拟环境中pip的缓存在哪里? [英] Where is pip's cache in a virtualenv?

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

问题描述

使用虚拟环境时,pip的缓存在哪里?它是默认缓存吗?如果是这样,如果删除虚拟环境,这些下载的软件包/工具是否仍会保留?

Where is pip's cache when using a virtual environment? Is it the default cache? If so, won't those downloaded packages/wheels remain if you delete the virtual environment?

推荐答案

无论您是否在virtualenv中工作,Pip确实都使用默认缓存.这确实意味着,在删除您的virtualenv之后,不会删除与其相关的任何pip缓存.

Pip uses the default cache indeed, whether you're working inside a virtualenv or not. This indeed means that after removing your virtualenv, any pip cache related to it is not removed.

请注意,已安装的程序包本身将被删除,而不会删除下载缓存.

Mind that the installed packages themselves are deleted, just not the download cache.

为什么会有问题?我认为这是预期的行为,因为稍后在另一个virtualenv中安装相同的软件包时,您会获得优势.

Why would that be a problem? I think this is expected behaviour, since you gain an advantage when installing the same package in another virtualenv later on.

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

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