(Search) (../../search/) (Copyright) (../../copyright/) (pip wheel) (../pip_wheel/) (pip check) (../pip_check/) pip download - pip documentation v24.3.dev0 (../../_static/pygments.css?v=a746c00c) (../../_static/styles/furo.css?v=354aac6f) (../../_static/copybutton.css?v=76b2166b) (../../_static/tabs.css?v=4c969af8) (/_/static/css/badge_only.css) (../../_static/styles/furo-extensions.css?v=302659d7) (/_/static/css/readthedocs-doc-embed.css) Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Hide navigation sidebar Hide table of contents sidebar Skip to content Toggle site navigation sidebar (../../) pip documentation v24.3.dev0 Toggle Light / Dark / Auto color theme Toggle table of contents sidebar (../../) pip documentation v24.3.dev0 (Search) (yes) (default) (../../getting-started/) Getting Started (../../installation/) Installation (../../user_guide/) User Guide (../../topics/) Topic Guides Toggle navigation of Topic Guides (../../topics/authentication/) Authentication (../../topics/caching/) Caching (../../topics/configuration/) Configuration (../../topics/dependency-resolution/) Dependency Resolution (../../topics/more-dependency-resolution/) More on Dependency Resolution (../../topics/https-certificates/) HTTPS Certificates (../../topics/local-project-installs/) Local project installs (../../topics/repeatable-installs/) Repeatable Installs (../../topics/secure-installs/) Secure installs (../../topics/vcs-support/) VCS Support (../../topics/python-option/) Managing a different Python interpreter (../../topics/workflow/) Pip is not a workflow management tool (../../reference/) Reference Toggle navigation of Reference (../../reference/build-system/) Build System Interface Toggle navigation of Build System Interface (../../reference/build-system/pyproject-toml/) pyproject.toml (../../reference/build-system/setup-py/) setup.py (legacy) (../../reference/requirement-specifiers/) Requirement Specifiers (../../reference/requirements-file-format/) Requirements File Format (../../reference/installation-report/) Installation Report (../../reference/inspect-report/) pip inspect JSON output specification (../) Commands Toggle navigation of Commands (../pip/) pip (../pip_install/) pip install (../pip_uninstall/) pip uninstall (../pip_inspect/) pip inspect (../pip_list/) pip list (../pip_show/) pip show (../pip_freeze/) pip freeze (../pip_check/) pip check pip download (../pip_wheel/) pip wheel (../pip_hash/) pip hash (../pip_search/) pip search (../pip_cache/) pip cache (../pip_config/) pip config (../pip_debug/) pip debug Project (../../development/) Development Toggle navigation of Development (../../development/getting-started/) Getting Started (../../development/contributing/) Contributing (../../development/ci/) Continuous Integration (../../development/issue-triage/) Issue Triage (../../development/architecture/) Architecture of pip’s internals Toggle navigation of Architecture of pip’s internals (../../development/architecture/overview/) Broad functionality overview (../../development/architecture/anatomy/) Repository anatomy & directory structure (../../development/architecture/configuration-files/) Configuration File Handling (../../development/architecture/package-finding/) Finding and choosing files (index and PackageFinder ) (../../development/architecture/command-line-interface/) Command Line Interface (../../development/architecture/upgrade-options/) Options that control the installation process (../../development/release-process/) Release process (../../development/vendoring-policy/) Vendoring Policy (../../ux-research-design/) UX Research & Design Toggle navigation of UX Research & Design (../../ux-research-design/contribute/) How to Contribute (../../ux-research-design/guidance/) UX Guidance (../../ux-research-design/research-results/) UX Research Results Toggle navigation of UX Research Results (../../ux-research-design/research-results/about-our-users/) About pip’s Users (../../ux-research-design/research-results/mental-models/) How Users Understand pip (../../ux-research-design/research-results/users-and-security/) How pip users think about security (../../ux-research-design/research-results/ci-cd/) How pip is used in interactive environments (i.e. CI, CD) (../../ux-research-design/research-results/personas/) pip Personas (../../ux-research-design/research-results/prioritizing-features/) Prioritizing pip Features (../../ux-research-design/research-results/override-conflicting-dependencies/) Providing an override to install packages with conflicting dependencies (../../ux-research-design/research-results/pip-force-reinstall/) pip --force-reinstall (../../ux-research-design/research-results/pip-search/) pip search (../../ux-research-design/research-results/pip-upgrade-conflict/) pip Upgrade Conflict (../../ux-research-design/research-results/improving-pips-documentation/) Improving pip’s Documentation (../../news/) Changelog (https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md) Code of Conduct (https://github.com/pypa/pip) GitHub v: latest v: latest Versions (https://pip.pypa.io/en/latest/cli/pip_download/) latest (https://pip.pypa.io/en/stable/cli/pip_download/) stable On Read the Docs (//readthedocs.org/projects/pip/) Project Home (//readthedocs.org/projects/pip/builds/) Builds (//readthedocs.org/projects/pip/downloads/) Downloads On GitHub (https://github.com/pypa/pip/blob/main/docs/html/cli/pip_download.rst) View (https://github.com/pypa/pip/edit/main/docs/html/cli/pip_download.rst) Edit Search (Search docs) Hosted by (https://readthedocs.org) Read the Docs · (https://docs.readthedocs.io/page/privacy-policy.html) Privacy Policy Back to top (../../_sources/cli/pip_download.rst.txt) (View this page) View this page (https://github.com/pypa/pip/edit/main/docs/html/cli/pip_download.rst) (Edit this page) Edit this page Toggle Light / Dark / Auto color theme Toggle table of contents sidebar pip download(Link to this heading) ¶ Usage(Link to this heading) ¶ Unix/macOS python - m pip download [ options ] < requirement specifier > [ package - index - options ] ... python - m pip download [ options ] - r < requirements file > [ package - index - options ] ... python - m pip download [ options ] < vcs project url > ... python - m pip download [ options ] < local project path > ... python - m pip download [ options ] < archive url / path > ... Copy to clipboard Windows py - m pip download [ options ] < requirement specifier > [ package - index - options ] ... py - m pip download [ options ] - r < requirements file > [ package - index - options ] ... py - m pip download [ options ] < vcs project url > ... py - m pip download [ options ] < local project path > ... py - m pip download [ options ] < archive url / path > ... Copy to clipboard Description(Link to this heading) ¶ Download packages from: PyPI (and other indexes) using requirement specifiers. VCS project urls. Local project directories. Local or remote source archives. pip also supports downloading from “requirements files”, which provide an easy way to specify a whole environment to be downloaded. Overview(Link to this heading) ¶ pip download does the same resolution and downloading as pip install , but instead of installing the dependencies, it collects the downloaded distributions into the directory provided (defaulting to the current directory). This directory can later be passed as the value to pip install --find-links to facilitate offline or locked down package installation. pip download with the --platform , --python-version , --implementation , and --abi options provides the ability to fetch dependencies for an interpreter and system other than the ones that pip is running on. --only-binary=:all: or --no-deps is required when using any of these options. It is important to note that these options all default to the current system/interpreter, and not to the most restrictive constraints (e.g. platform any, abi none, etc). To avoid fetching dependencies that happen to match the constraint of the current interpreter (but not your target one), it is recommended to specify all of these options if you are specifying one of them. Generic dependencies (e.g. universal wheels, or dependencies with no platform, abi, or implementation constraints) will still match an over- constrained download requirement. If some of your dependencies are not available as binaries, you can build them manually for your target platform and let pip download know where to find them using --find-links . Options(Link to this heading) ¶ -c , --constraint (Link to this definition) ¶ Constrain versions using the given constraints file. This option can be used multiple times. (environment variable: PIP_CONSTRAINT ) -r , --requirement (Link to this definition) ¶ Install from the given requirements file. This option can be used multiple times. (environment variable: PIP_REQUIREMENT ) --no-deps (Link to this definition) ¶ Don’t install package dependencies. (environment variable: PIP_NO_DEPS , PIP_NO_DEPENDENCIES ) --global-option (Link to this definition) ¶ Extra global options to be supplied to the setup.py call before the install or bdist_wheel command. (environment variable: PIP_GLOBAL_OPTION ) --no-binary (Link to this definition) ¶ 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. (environment variable: PIP_NO_BINARY ) --only-binary (Link to this definition) ¶ 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. (environment variable: PIP_ONLY_BINARY ) --prefer-binary (Link to this definition) ¶ Prefer binary packages over source packages, even if the source packages are newer. (environment variable: PIP_PREFER_BINARY ) --src (Link to this definition) ¶ Directory to check out editable projects into. The default in a virtualenv is “/src”. The default for global installs is “/src”. (environment variable: PIP_SRC , PIP_SOURCE , PIP_SOURCE_DIR , PIP_SOURCE_DIRECTORY ) --pre (Link to this definition) ¶ Include pre-release and development versions. By default, pip only finds stable versions. (environment variable: PIP_PRE ) --require-hashes (Link to this definition) ¶ 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. (environment variable: PIP_REQUIRE_HASHES ) --progress-bar (Link to this definition) ¶ Specify whether the progress bar should be used [on, off, raw] (default: on) (environment variable: PIP_PROGRESS_BAR ) --no-build-isolation (Link to this definition) ¶ Disable isolation when building a modern source distribution. Build dependencies specified by PEP 518 must be already installed if this option is used. (environment variable: PIP_NO_BUILD_ISOLATION ) --use-pep517 (Link to this definition) ¶ Use PEP 517 for building source distributions (use --no-use-pep517 to force legacy behaviour). (environment variable: PIP_USE_PEP517 ) --check-build-dependencies (Link to this definition) ¶ Check the build dependencies when PEP517 is used. (environment variable: PIP_CHECK_BUILD_DEPENDENCIES ) --ignore-requires-python (Link to this definition) ¶ Ignore the Requires-Python information. (environment variable: PIP_IGNORE_REQUIRES_PYTHON ) -d , --dest (Link to this definition) ¶ Download packages into . (environment variable: PIP_DEST , PIP_DESTINATION_DIR , PIP_DESTINATION_DIRECTORY ) --platform (Link to this definition) ¶ Only use wheels compatible with . Defaults to the platform of the running system. Use this option multiple times to specify multiple platforms supported by the target interpreter. (environment variable: PIP_PLATFORM ) --python-version (Link to this definition) ¶ 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). (environment variable: PIP_PYTHON_VERSION ) --implementation (Link to this definition) ¶ Only use wheels compatible with Python 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. (environment variable: PIP_IMPLEMENTATION ) --abi (Link to this definition) ¶ Only use wheels compatible with Python abi , e.g. ‘pypy_41’. If not specified, then the current interpreter abi tag is used. Use this option multiple times to specify multiple abis supported by the target interpreter. Generally you will need to specify --implementation, --platform, and --python-version when using this option. (environment variable: PIP_ABI ) --no-clean (Link to this definition) ¶ Don’t clean up build directories. (environment variable: PIP_NO_CLEAN ) -i , --index-url (Link to this definition) ¶ Base URL of the Python Package Index (default (https://pypi.org/simple) 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. (environment variable: PIP_INDEX_URL , PIP_PYPI_URL ) --extra-index-url (Link to this definition) ¶ Extra URLs of package indexes to use in addition to --index-url. Should follow the same rules as --index-url. (environment variable: PIP_EXTRA_INDEX_URL ) --no-index (Link to this definition) ¶ Ignore package index (only looking at --find-links URLs instead). (environment variable: PIP_NO_INDEX ) -f , --find-links (Link to this definition) ¶ 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://) file:// URL that’s a directory, then look for archives in the directory listing. Links to VCS project URLs are not supported. (environment variable: PIP_FIND_LINKS ) Examples(Link to this heading) ¶ Download a package and all of its dependencies Unix/macOS python -m pip download SomePackage python -m pip download -d . SomePackage # equivalent to above python -m pip download --no-index --find-links= /tmp/wheelhouse -d /tmp/otherwheelhouse SomePackage Copy to clipboard Windows py -m pip download SomePackage py -m pip download -d . SomePackage # equivalent to above py -m pip download --no-index --find-links= /tmp/wheelhouse -d /tmp/otherwheelhouse SomePackage Copy to clipboard Download a package and all of its dependencies with OSX specific interpreter constraints. This forces OSX 10.10 or lower compatibility. Since OSX deps are forward compatible, this will also match macosx_10_9_x86_64 , macosx_10_8_x86_64 , macosx_10_8_intel , etc. It will also match deps with platform any . Also force the interpreter version to 27 (or more generic, i.e. 2 ) and implementation to cp (or more generic, i.e. py ). Unix/macOS python -m pip download \ --only-binary= :all: \ --platform macosx_10_10_x86_64 \ --python-version 27 \ --implementation cp \ SomePackage Copy to clipboard Windows py -m pip download ^ --only-binary= :all: ^ --platform macosx_10_10_x86_64 ^ --python-version 27 ^ --implementation cp ^ SomePackage Copy to clipboard Download a package and its dependencies with linux specific constraints. Force the interpreter to be any minor version of py3k, and only accept cp34m or none as the abi. Unix/macOS python -m pip download \ --only-binary= :all: \ --platform linux_x86_64 \ --python-version 3 \ --implementation cp \ --abi cp34m \ SomePackage Copy to clipboard Windows py -m pip download ^ --only-binary= :all: ^ --platform linux_x86_64 ^ --python-version 3 ^ --implementation cp ^ --abi cp34m ^ SomePackage Copy to clipboard Force platform, implementation, and abi agnostic deps. Unix/macOS python -m pip download \ --only-binary= :all: \ --platform any \ --python-version 3 \ --implementation py \ --abi none \ SomePackage Copy to clipboard Windows py -m pip download ^ --only-binary= :all: ^ --platform any ^ --python-version 3 ^ --implementation py ^ --abi none ^ SomePackage Copy to clipboard Even when overconstrained, this will still correctly fetch the pip universal wheel. Unix/macOS $ python -m pip download \ --only-binary= :all: \ --platform linux_x86_64 \ --python-version 33 \ --implementation cp \ --abi cp34m \ pip>= 8 Copy to clipboard $ ls pip-8.1.1-py2.py3-none-any.whl pip-8.1.1-py2.py3-none-any.whl Copy to clipboard Windows C:\> py -m pip download ^ --only-binary=:all: ^ --platform linux_x86_64 ^ --python-version 33 ^ --implementation cp ^ --abi cp34m ^ pip>=8 Copy to clipboard C:\> dir pip-8.1.1-py2.py3-none-any.whl pip-8.1.1-py2.py3-none-any.whl Copy to clipboard Download a package supporting one of several ABIs and platforms. This is useful when fetching wheels for a well-defined interpreter, whose supported ABIs and platforms are known and fixed, different than the one pip is running under. Unix/macOS $ python -m pip download \ --only-binary= :all: \ --platform manylinux1_x86_64 --platform linux_x86_64 --platform any \ --python-version 36 \ --implementation cp \ --abi cp36m --abi cp36 --abi abi3 --abi none \ SomePackage Copy to clipboard Windows C:> py -m pip download ^ --only-binary=:all: ^ --platform manylinux1_x86_64 --platform linux_x86_64 --platform any ^ --python-version 36 ^ --implementation cp ^ --abi cp36m --abi cp36 --abi abi3 --abi none ^ SomePackage Copy to clipboard (../pip_wheel/) Next pip wheel (../pip_check/) Previous pip check (../../copyright/) Copyright © The pip developers Made with (https://www.sphinx-doc.org/) Sphinx and (https://pradyunsg.me) @pradyunsg 's (https://github.com/pradyunsg/furo) Furo (https://readthedocs.org/projects/pip) (https://github.com/pypa/pip) On this page pip download Usage Description Overview Options Examples