How to show installed Python package information

Showing installed Python package information is useful when a dependency version, install location, or owning environment needs to be confirmed before troubleshooting, upgrading, or removing one package. A focused metadata query is usually faster than reviewing the full package inventory when only one distribution matters.

The python3 -m pip show command reads the installed distribution metadata recorded for the active interpreter or virtual environment and prints it in RFC-compliant mail-header format. Fields such as Name, Version, Location, Requires, and Required-by show which distribution is installed, where its files live, and how it fits into the local dependency graph.

The result applies only to the interpreter that owns the current python3 -m pip invocation, so the same host can return different answers from a different virtual environment, user-site install, or alternate Python binary. Query the distribution name rather than assuming the import name used in code, expect some metadata fields to be blank when a project does not publish them, and on Windows replace python3 -m pip with py -m pip when the launcher is available.

Steps to show installed Python package information with pip:

  1. Identify the interpreter and pip installation that will answer the metadata query.
    $ python3 -c "import sys; print(sys.executable)"
    /srv/release-audit/.venv/bin/python3
    
    $ python3 -m pip --version
    pip 26.0.1 from /srv/release-audit/.venv/lib/python3.14/site-packages/pip (python 3.14)

    Running pip through the interpreter with python3 -m pip avoids mixing the wrong pip executable with another Python install.

  2. Query the standard metadata block for the target distribution package.
    $ python3 -m pip show compliance-audit-client
    Name: compliance-audit-client
    Version: 3.6.0
    Summary: Shared API client for compliance audit jobs.
    Home-page: https://packages.internal.example/compliance-audit-client
    Author: Platform Engineering
    Author-email: python-maintainers@internal.example
    License: Apache-2.0
    Location: /srv/release-audit/.venv/lib/python3.14/site-packages
    Requires: auth-header-utils, http-transport-core, policy-schema
    Required-by: release-orchestrator

    pip show accepts more than one package name, but checking one distribution at a time is usually easier when troubleshooting or comparing environments.

    Fields such as Home-page or Author depend on the package metadata published upstream and may be blank even when the distribution is installed correctly.

  3. Add --verbose when the standard block does not expose enough recorded metadata.
    $ python3 -m pip show --verbose compliance-audit-client
    Name: compliance-audit-client
    Version: 3.6.0
    Summary: Shared API client for compliance audit jobs.
    Home-page: https://packages.internal.example/compliance-audit-client
    Author: Platform Engineering
    Author-email: python-maintainers@internal.example
    License: Apache-2.0
    Location: /srv/release-audit/.venv/lib/python3.14/site-packages
    Requires: auth-header-utils, http-transport-core, policy-schema
    Required-by: release-orchestrator
    Metadata-Version: 2.4
    Installer: pip
    Classifiers:
      Intended Audience :: Developers
      License :: OSI Approved :: Apache Software License
      Programming Language :: Python :: 3
      Topic :: Software Development :: Libraries
    ##### additional metadata omitted #####

    --verbose is the general pip verbosity flag for the command and expands the metadata block with fields such as Metadata-Version, Installer, classifiers, and entry points when the distribution records them.

  4. Add --files when the installed file list is needed for auditing, cleanup, or package tracing.
    $ python3 -m pip show --files compliance-audit-client
    Name: compliance-audit-client
    Version: 3.6.0
    Summary: Shared API client for compliance audit jobs.
    Home-page: https://packages.internal.example/compliance-audit-client
    Author: Platform Engineering
    Author-email: python-maintainers@internal.example
    License: Apache-2.0
    Location: /srv/release-audit/.venv/lib/python3.14/site-packages
    Requires: auth-header-utils, http-transport-core, policy-schema
    Required-by: release-orchestrator
    Files:
      compliance_audit_client-3.6.0.dist-info/INSTALLER
      compliance_audit_client-3.6.0.dist-info/METADATA
      compliance_audit_client-3.6.0.dist-info/RECORD
      compliance_audit_client-3.6.0.dist-info/WHEEL
      compliance_audit_client/__init__.py
      compliance_audit_client/api.py
    ##### additional package files omitted #####

    The file list comes from the package metadata recorded at install time, which makes it useful for tracing exactly which paths the current interpreter owns for that distribution.

  5. Filter the returned fields when only the package version, location, or dependency edges need a quick check.
    $ python3 -m pip show compliance-audit-client | grep -E '^(Name|Version|Location|Requires|Required-by):'
    Name: compliance-audit-client
    Version: 3.6.0
    Location: /srv/release-audit/.venv/lib/python3.14/site-packages
    Requires: auth-header-utils, http-transport-core, policy-schema
    Required-by: release-orchestrator

    This is a practical post-install or pre-upgrade verification pattern when the package name is already known and the full metadata block is unnecessary.

  6. Check the warning path when the requested distribution is not installed in the current interpreter context.
    $ python3 -m pip show does-not-exist
    WARNING: Package(s) not found: does-not-exist

    pip show exits non-zero when the requested package is missing, so shell scripts can treat the result as a failure instead of a partial success. If the package should exist, confirm the active interpreter first and verify that the distribution name matches the installed project name rather than only the import name used in code.