本文介绍了pip的`--no-cache-dir`有什么用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近看到Docker文件中使用了--no-cache-dir
.我以前从未见过该标志,并且帮助没有对其进行解释:
I've recently seen the --no-cache-dir
being used in a Docker file. I've never seen that flag before and the help is not explaining it:
--no-cache-dir Disable the cache.
- 问题:缓存了什么?
- 问题:缓存的用途是什么?
- 问题:我为什么要禁用它?
- Question: What is cached?
- Question: What is the cache used for?
- Question: Why would I want to disable it?
推荐答案
- 已缓存:隐藏存储或将来使用
- 用于
- 存储通过pip安装的模块的安装文件(
.whl
等) - 存储源文件(
.tar.gz
等),以避免在未到期时重新下载
- 存储通过pip安装的模块的安装文件(
- Cached is: store away in hiding or for future use
- Used for
- store the installation files(
.whl
, etc) of the modules that you install through pip - store the source files (
.tar.gz
, etc) to avoid re-download when not expired
- store the installation files(
- 您的硬盘驱动器上没有空间
- 以前使用意外设置运行
pip install
- 例如:
- 以前运行
export PYCURL_SSL_LIBRARY=nss
和pip install pycurl
- 要重新运行
export PYCURL_SSL_LIBRARY=openssl
和pip install pycurl --compile --no-cache-dir
- you don't have space on your hard drive
- previously run
pip install
with unexpected settings- eg:
- previously run
export PYCURL_SSL_LIBRARY=nss
andpip install pycurl
- want new run
export PYCURL_SSL_LIBRARY=openssl
andpip install pycurl --compile --no-cache-dir
文档链接
https://pip.pypa.io/en/stable/reference /pip_install/#caching – @emredjan https://pip.pypa.io/en/stable/reference/pip_install/-@mikea
https://pip.pypa.io/en/stable/reference/pip_install/#caching – @emredjanhttps://pip.pypa.io/en/stable/reference/pip_install/ - @mikea
这篇关于pip的`--no-cache-dir`有什么用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
- previously run
- eg:
- 以前运行
- 例如: