Skip to content

pip

Complete command and global option reference for python -m pip, including practical examples for package management, debugging, networking, and configuration


Install packages.

python -m pip install

Generate a lock file.

python -m pip lock

Download packages.

python -m pip download

Uninstall packages.

python -m pip uninstall

Output installed packages in requirements format.

python -m pip freeze

Inspect the python environment.

python -m pip inspect

List installed packages.

python -m pip list

Show information about installed packages.

python -m pip show

Verify installed packages have compatible dependencies.

python -m pip check

Manage local and global configuration.

python -m pip config

Search PyPI for packages.

python -m pip search

Inspect and manage pip's wheel cache.

python -m pip cache

Inspect information available from package indexes.

python -m pip index

Build wheels from your requirements.

python -m pip wheel

Compute hashes of package archives.

python -m pip hash

A helper command used for command completion.

python -m pip completion

Show information useful for debugging.

python -m pip debug

Show help for commands.

python -m pip help

Let unhandled exceptions propagate outside the main subroutine, instead of logging them to stderr.

python -m pip --debug

Run pip in an isolated mode, ignoring environment variables and user configuration.

python -m pip --isolated

Allow pip to only run in a virtual environment; exit with an error otherwise.

python -m pip --require-virtualenv

Run pip with the specified Python interpreter.

python -m pip --python <python>

Give more output. Option is additive, and can be used up to 3 times.

python -m pip -v, --verbose

Show version and exit.

python -m pip -V, --version

Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).

python -m pip -q, --quiet

Path to a verbose appending log.

python -m pip --log <path>

Disable prompting for input.

python -m pip --no-input

Enable the credential lookup via the keyring library if user input is allowed. Specify which mechanism to use [auto, disabled, import, subprocess]. (default: auto)

python -m pip --keyring-provider <keyring_provider>

Specify a proxy in the form scheme://[user:passwd@]proxy.server:port.

python -m pip --proxy <proxy>

Maximum attempts to establish a new HTTP connection. (default: 5)

python -m pip --retries <retries>

Set the socket timeout (default 15 seconds).

python -m pip --timeout <sec>

Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.

python -m pip --exists-action <action>

Mark this host or host:port pair as trusted, even though it does not have valid or any HTTPS.

python -m pip --trusted-host <hostname>

Path to PEM-encoded CA certificate bundle. If provided, overrides the default. See 'SSL Certificate Verification' in pip documentation for more information.

python -m pip --cert <path>

Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.

python -m pip --client-cert <path>

Store the cache data in directory`

python -m pip --cache-dir <dir>

Disable the cache.

python -m pip --no-cache-dir

Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with –no- index.

python -m pip --disable-pip-version-check

Suppress colored output.

python -m pip --no-color

Enable new functionality, that may be backward incompatible.

python -m pip --use-feature <feature>

Enable deprecated functionality, that will be removed in the future.

python -m pip --use-deprecated <feature>

Maximum attempts to resume or restart an incomplete download. (default: 5)

python -m pip --resume-retries <resume_retries>