Where is pip's cache in a virtualenv?

后端 未结 2 1898
情深已故
情深已故 2021-01-11 15:14

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?

相关标签:
2条回答
  • 2021-01-11 15:35

    According to documentation pip caching

    The default location for the cache directory depends on the Operating System

    0 讨论(0)
  • 2021-01-11 15:54

    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.

    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.

    0 讨论(0)
提交回复
热议问题