python -m pip --versionUseful when multiple Python interpreters exist and you need to confirm which pip instance is active.
Core pip commands for installing, upgrading, uninstalling, inspecting, and managing Python packages.
python -m pip --versionUseful when multiple Python interpreters exist and you need to confirm which pip instance is active.
python -m pip helpLists pip subcommands and global options.
python -m pip help installGreat for discovering flags like `--upgrade`, `--requirement`, and `--index-url`.
Show installed packages in the active environment.
python -m pip listLists package names and installed versions.
python -m pip list --outdatedUseful before upgrading an environment or reviewing stale dependencies.
python -m pip show requestsDisplays version, location, dependencies, and package metadata.
python -m pip install requestsInstalls the package into the active interpreter environment.
python -m pip install "requests==2.32.3"Use exact pins for reproducibility and compatibility control.
Allow a controlled range of versions.
python -m pip install "requests>=2.31,<3"Common in development workflows where some flexibility is acceptable.
python -m pip install --upgrade requests`--upgrade` tells pip to replace an installed version when a newer one is available.
python -m pip install --upgrade pipPrefer `python -m pip` to avoid accidentally upgrading a different interpreter's pip.
python -m pip uninstall requestspip prompts for confirmation unless you pass `-y`.
python -m pip uninstall -y requestsUseful in scripts and CI jobs.
Report broken or incompatible installed dependencies.
python -m pip checkHelpful after upgrading packages or mixing manual installs.
python -m pip freezeTypically used to generate `requirements.txt` style output.
Output structured JSON details for the environment.
python -m pip inspectUseful for tooling and automated analysis.
Show candidate versions for a package from the index.
python -m pip index versions requestsUseful when choosing a version pin or troubleshooting resolver issues.
Fetch distributions locally without modifying the environment.
python -m pip download requests -d ./packagesGood for offline installs, caching, or artifact prep.
python -m pip install --index-url https://pypi.org/simple requestsOverride the default package index for this invocation.
python -m pip install --extra-index-url https://example.com/simple internal-packageCommon when mixing public PyPI packages with private packages.
Disable indexes and use local artifacts.
python -m pip install --no-index --find-links ./wheels requestsUseful for offline or hermetic builds.
Bypass HTTPS verification restrictions for a host.
python -m pip install --trusted-host internal.example.com --index-url http://internal.example.com/simple internal-packageUse carefully. Prefer proper TLS whenever possible.
Permit alpha, beta, and release candidate versions.
python -m pip install --pre package-nameUseful when testing against preview package releases.
python -m pip install --no-binary :all: lxmlUseful when you need local compilation or want to validate source builds.
python -m pip install --only-binary :all: numpyUseful in environments where build toolchains are unavailable.
python -m pip wheel -r requirements.txt -w ./wheelhouseCreates reusable wheel artifacts for later installation.
python -m pip install ./wheelhouse/package_name-1.0.0-py3-none-any.whlUseful in offline or reproducible deployment workflows.