pip download 参数与使用

--no-clean Don't clean up build directories.

         不要清理构建目录。

  -c, --constraint <file> Constrain versions using the given constraints file. This option can be used multiple times.

           使用给定的约束文件约束版本。此选项可以多次使用。

  -r, --requirement <file> Install from the given requirements file. This option can be used multiple times.

           从给定的需求文件安装。此选项可以多次使用。

  -b, --build <dir> Directory to unpack packages into and build in. Note that an initial build still takes place in a temporary directory. The location of temporary directories can be controlled by setting the TMPDIR environment variable (TEMP on Windows) appropriately. When passed, build directories are not cleaned in case of failures.

           用于将软件包解包并构建的目录。请注意,初始构建仍在临时目录中进行。可以通过适当设置TMPDIR环境变量(在Windows上为TEMP)来控制临时目录的位置。通过时,构建目录不会在失败的情况下清除。

  --no-deps Don't install package dependencies.

           不要安装软件包依赖项。仅下载指定包。

  --global-option <options> Extra global options to be supplied to the setup.py call before the install command.

           在安装命令之前,将向setup.py调用提供额外的全局选项。

  --no-binary <format_control> Do not use binary packages. Can be supplied multiple times, and each time adds to the existing value. Accepts either ":all:" to disable all binary packages, ":none:" to empty the set (notice the colons), or one or more package names with commas between them (no colons). Note that some packages are tricky to compile and may fail to install when this option is used on them.

           不要使用二进制包。可以多次提供,每次都增加到现有值。接受“:all:”禁用所有二进制软件包,接受“:none:”清空集合(注意冒号),或者接受一个或多个软件包名称,并且它们之间用逗号分隔(不冒号)。请注意,某些软件包很难编译,当在其上使用此选项时可能无法安装。

 

  --only-binary <format_control>

                                Do not use source packages. Can be supplied multiple times, and each time adds to the existing value. Accepts either ":all:" to disable all source packages, ":none:" to empty the set, or one or more package names with commas between them. Packages without binary distributions will fail to install when this option is used on them.

                                不要使用源程序包。可以多次提供,每次都增加到现有值。接受“:all:”禁用所有源软件包,或者接受“:none:”清空集合,或者接受一个或多个软件包名称,并且它们之间用逗号分隔。如果没有二进制分发包,则在使用此选项时将无法安装。

  --prefer-binary Prefer older binary packages over newer source packages.

           与新的源软件包相比,旧的二进制软件包更为可取。

  --src <dir> Directory to check out editable projects into. The default in a virtualenv is "<venv path>/src". The default for global installs is "<current dir>/src".

           检出可编辑项目的目录。 virtualenv中的默认值为“ <venv path> / src”。全局安装的默认值为“ <当前目录> / src”。

  --pre Include pre-release and development versions. By default, pip only finds stable versions.

           包括预发行和开发版本。默认情况下,pip仅查找稳定版本。

  --require-hashes Require a hash to check each requirement against, for repeatable installs. This option is implied when any package in a requirements file has a --hash option.

           需要一个哈希值来检查每个要求,以确保可重复安装。当需求文件中的任何程序包都具有--hash选项时,将隐含此选项。

  --progress-bar <progress_bar> Specify type of progress to be displayed [off|on|ascii|pretty|emoji] (default: on)

           指定要显示的进度类型[off | on | ascii | pretty | emoji](默认值:on) 

  --no-build-isolation Disable isolation when building a modern source distribution. Build dependencies specified by PEP 518 must be already installed if this option is used.

           构建现代源分发时禁用隔离。如果使用此选项,则必须已经安装了由PEP 518指定的生成依赖项。

  --use-pep517 Use PEP 517 for building source distributions (use --no-use-pep517 to force legacy behaviour).

           使用PEP 517构建源代码发行版(使用--no-use-pep517强制执行传统行为)。

  -d, --dest <dir> Download packages into <dir>.

           将软件包下载到<dir>中。

  --platform <platform> Only use wheels compatible with <platform>. Defaults to the platform of the running system.

           仅使用与<platform>兼容的whl。默认为正在运行的系统的平台。

    注 :manylinux2014_x86_64或者manylinux1_x86_64,而不是linux_x86_64。

  --python-version <python_version> The Python interpreter version to use for wheel and "Requires-Python" compatibility checks. Defaults to a version derived from the running interpreter. The version can be specified using up to three dot-separated integers (e.g. "3" for 3.0.0, "3.7" for 3.7.0, or "3.7.3"). A major-minor version can also be given as a string without dots (e.g. "37" for 3.7.0).

           用于车轮和“ Requires-Python”兼容性检查的Python解释器版本。默认为从运行的解释器派生的版本。最多可以使用三个点分隔的整数来指定版本(例如,“ 3”代表3.0.0,“ 3.7”代表3.7.0或“ 3.7.3”)。主次版本也可以不带点的字符串形式给出(例如,“ 3.7.0”为“ 37”)。

  --implementation <implementation>

                                Only use wheels compatible with Python implementation <implementation>, e.g. 'pp', 'jy', 'cp', or 'ip'. If not specified, then the current interpreter implementation is used. Use 'py' to force implementation-agnostic wheels.

                                仅使用与Python实现<implementation>兼容的轮子,例如'pp','jy','cp'或'ip'。如果未指定,则使用当前的解释器实现。使用'py'强制实现无关的轮子。

  --abi <abi> Only use wheels compatible with Python abi <abi>, e.g. 'pypy_41'. If not specified, then the current interpreter abi tag is used. Generally you will need to specify --implementation, --platform, and --python-version when using this option.

           仅使用与Python abi <abi>兼容的轮子,例如'pypy_41'。如果未指定,则使用当前的解释器abi标签。通常,使用此选项时,需要指定--implementation,--platform和--python-version。

Package Index Options:

  -i, --index-url <url> Base URL of the Python Package Index (default https://pypi.org/simple). This should point to a repository compliant with PEP 503 (the simple repository API) or a local directory laid out in the same format.

           Python软件包索引的基本URL(默认为https://pypi.org/simple)。这应指向符合PEP 503(简单存储库API)的存储库或以相同格式布置的本地目录。

  --extra-index-url <url> Extra URLs of package indexes to use in addition to --index-url. Should follow the same rules as --index-url.

           除--index-url外,还使用包索引的其他URL。应遵循与--index-url相同的规则。

  --no-index Ignore package index (only looking at --find-links URLs instead).

         忽略软件包索引(仅查看--find-links URL)。

  -f, --find-links <url> If a URL or path to an html file, then parse for links to archives such as sdist (.tar.gz) or wheel (.whl) files. If a local path or file:// URL that's a directory, then look for archives in the directory listing. Links to VCS project URLs are not supported

           如果是html文件的URL或路径,请解析以找到指向sdist(.tar.gz)或wheel(.whl)文件等档案的链接。如果是目录的本地路径或file:// URL,请在目录列表中查找档案。不支持VCS项目URL的链接



posted @ 2021-09-13 14:16  qzl  阅读(2406)  评论(0编辑  收藏  举报