pip-show
Show installed Python package details
TLDR
Show information about a package
Show all information about a package
Show all installed files for a package
SYNOPSIS
pip show [options] <package> [..._]
PARAMETERS
-f, --files
Display the list of all files installed as part of the specified package.
-v, --verbose
Show more detailed output. This typically includes the 'Required-by' section, listing packages that depend on the queried package.
--no-color
Suppress colored output in the terminal, presenting plain text.
DESCRIPTION
The pip show command is a powerful utility within the Python package installer (pip) ecosystem, designed to provide comprehensive details about one or more installed Python packages.
Unlike pip list, which offers a concise summary of package names and versions, pip show delves much deeper, presenting a rich set of metadata. This includes the package's name, version, a brief summary, its homepage, author, license, and crucially, its installation location on the system.
Furthermore, it clearly outlines the package's dependencies (what it Requires to function) and, when used with the --verbose option, lists other packages that Required-by it (i.e., packages that depend on the queried package). With the --files option, it can even enumerate every file installed as part of the package.
This command is invaluable for debugging package-related issues, verifying installations, understanding complex dependency trees, or simply gaining a deeper insight into the Python libraries powering your projects.
CAVEATS
Scope Limitation: pip show only provides information for packages installed via pip or compatible mechanisms. It cannot query packages installed manually or through system package managers (e.g., apt, yum) unless those installations are also managed by pip in the same environment.
Metadata Reliance: The accuracy and completeness of the displayed information depend entirely on the metadata provided by the package maintainer. Malformed or missing metadata can lead to incomplete or incorrect output.
Environment Specific: The command operates within the currently active Python environment (virtual environment or system-wide). Ensure you are in the correct environment to view relevant package information.
Lengthy Output: When using the --files option for a large package, the output can be extremely long, potentially making it difficult to parse directly in the terminal without piping to a pager like less.
UNDERSTANDING OUTPUT FIELDS
When you run pip show, you'll see several fields providing crucial details about the package:
Name: The official name of the package.
Version: The installed version number.
Summary: A brief one-line description of what the package does.
Home-page: The URL to the project's official website or documentation.
Author: The name of the package author or organization.
License: The software license under which the package is distributed (e.g., MIT, Apache 2.0).
Location: The file path where the package is installed on your system. This is especially useful for understanding virtual environment installations.
Requires: A list of other packages that this package depends on to function correctly.
Required-by (with -v): A list of other installed packages that depend on the package you are querying. This helps in understanding reverse dependencies.
Files (with -f): A comprehensive list of all individual files and directories that comprise the installed package.
PRACTICAL EXAMPLES
Here are some common ways to use the pip show command:
Basic package information:
$ pip show requests
Viewing files installed by a package:
$ pip show --files numpy
Getting verbose output, including 'Required-by':
$ pip show -v pandas
Querying multiple packages at once:
$ pip show flask django rich
HISTORY
The pip show command has been a foundational component of the pip utility since its early development. As a successor to easy_install, pip aimed to provide a more consistent and user-friendly interface for Python package management. pip show was introduced as a core command to address the crucial need for inspecting installed packages, allowing developers and administrators to quickly understand their environment.
While pip itself has undergone significant evolution, with improvements in dependency resolution, build processes, and command-line interface enhancements, the fundamental purpose and output structure of pip show have remained remarkably consistent. It continues to be a go-to command for verifying package installations and debugging environmental issues, reflecting its stable and essential role in the Python ecosystem.


