(Search) (../../search/) (Copyright) (../../copyright/) (pip install) (../pip_install/) (Commands) (../) pip - 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_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 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/) latest (https://pip.pypa.io/en/stable/cli/pip/) 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.rst) View (https://github.com/pypa/pip/edit/main/docs/html/cli/pip.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.rst.txt) (View this page) View this page (https://github.com/pypa/pip/edit/main/docs/html/cli/pip.rst) (Edit this page) Edit this page Toggle Light / Dark / Auto color theme Toggle table of contents sidebar pip(Link to this heading) ¶ Usage(Link to this heading) ¶ Unix/macOS python -m pip [ options] Copy to clipboard Windows py -m pip [ options] Copy to clipboard Description(Link to this heading) ¶ Logging(Link to this heading) ¶ Console logging(Link to this heading) ¶ pip offers -v, --verbose and -q, --quiet to control the console log level. By default, some messages (error and warnings) are colored in the terminal. If you want to suppress the colored output use --no-color . File logging(Link to this heading) ¶ pip offers the --log option for specifying a file where a maximum verbosity log will be kept. This option is empty by default. This log appends to previous logging. Like all pip options, --log can also be set as an environment variable, or placed into the pip config file. See the (../../topics/configuration/) Configuration section. --exists-action option(Link to this heading) ¶ This option specifies default behavior when path already exists. Possible cases: downloading files or checking out repositories for installation, creating archives. If --exists-action is not defined, pip will prompt when decision is needed. (s)witch Only relevant to VCS checkout. Attempt to switch the checkout to the appropriate URL and/or revision. (i)gnore Abort current operation (e.g. don’t copy file, don’t create archive, don’t modify a checkout). (w)ipe Delete the file or VCS checkout before trying to create, download, or checkout a new one. (b)ackup Rename the file or checkout to {name}{'.bak' * n} , where n is some number of .bak extensions, such that the file didn’t exist at some point. So the most recent backup will be the one with the largest number after .bak . (a)bort Abort pip and return non-zero exit status. Build System Interface This is now covered in (../../reference/build-system/) Build System Interface . General Options(Link to this heading) ¶ -h , --help (Link to this definition) ¶ Show help. (environment variable: PIP_HELP ) --debug (Link to this definition) ¶ Let unhandled exceptions propagate outside the main subroutine, instead of logging them to stderr. (environment variable: PIP_DEBUG ) --isolated (Link to this definition) ¶ Run pip in an isolated mode, ignoring environment variables and user configuration. (environment variable: PIP_ISOLATED ) --require-virtualenv (Link to this definition) ¶ Allow pip to only run in a virtual environment; exit with an error otherwise. (environment variable: PIP_REQUIRE_VIRTUALENV , PIP_REQUIRE_VENV ) --python (Link to this definition) ¶ Run pip with the specified Python interpreter. (environment variable: PIP_PYTHON ) -v , --verbose (Link to this definition) ¶ Give more output. Option is additive, and can be used up to 3 times. (environment variable: PIP_VERBOSE ) -V , --version (Link to this definition) ¶ Show version and exit. (environment variable: PIP_VERSION ) -q , --quiet (Link to this definition) ¶ Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels). (environment variable: PIP_QUIET ) --log (Link to this definition) ¶ Path to a verbose appending log. (environment variable: PIP_LOG , PIP_LOG_FILE , PIP_LOCAL_LOG ) --no-input (Link to this definition) ¶ Disable prompting for input. (environment variable: PIP_NO_INPUT ) --keyring-provider (Link to this definition) ¶ Enable the credential lookup via the keyring library if user input is allowed. Specify which mechanism to use [disabled, import, subprocess]. (default: disabled) (environment variable: PIP_KEYRING_PROVIDER ) --proxy (Link to this definition) ¶ Specify a proxy in the form scheme://[user:passwd@]proxy.server:port. (environment variable: PIP_PROXY ) --retries (Link to this definition) ¶ Maximum number of retries each connection should attempt (default 5 times). (environment variable: PIP_RETRIES ) --timeout (Link to this definition) ¶ Set the socket timeout (default 15 seconds). (environment variable: PIP_TIMEOUT , PIP_DEFAULT_TIMEOUT ) --exists-action (Link to this definition) ¶ Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort. (environment variable: PIP_EXISTS_ACTION ) --trusted-host (Link to this definition) ¶ Mark this host or host:port pair as trusted, even though it does not have valid or any HTTPS. (environment variable: PIP_TRUSTED_HOST ) --cert (Link to this definition) ¶ Path to PEM-encoded CA certificate bundle. If provided, overrides the default. See ‘SSL Certificate Verification’ in pip documentation for more information. (environment variable: PIP_CERT ) --client-cert (Link to this definition) ¶ Path to SSL client certificate, a single file containing the private key and the certificate in PEM format. (environment variable: PIP_CLIENT_CERT ) --cache-dir (Link to this definition) ¶ Store the cache data in . (environment variable: PIP_CACHE_DIR ) --no-cache-dir (Link to this definition) ¶ Disable the cache. (environment variable: PIP_NO_CACHE_DIR ) --disable-pip-version-check (Link to this definition) ¶ Don’t periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index. (environment variable: PIP_DISABLE_PIP_VERSION_CHECK ) --no-color (Link to this definition) ¶ Suppress colored output. (environment variable: PIP_NO_COLOR ) --no-python-version-warning (Link to this definition) ¶ Silence deprecation warnings for upcoming unsupported Pythons. (environment variable: PIP_NO_PYTHON_VERSION_WARNING ) --use-feature (Link to this definition) ¶ Enable new functionality, that may be backward incompatible. (environment variable: PIP_USE_FEATURE ) --use-deprecated (Link to this definition) ¶ Enable deprecated functionality, that will be removed in the future. (environment variable: PIP_USE_DEPRECATED ) (../pip_install/) Next pip install (../) Previous Commands (../../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 Usage Description Logging Console logging File logging --exists-action option General Options