Back to top

List installed packages, including editables.

Packages are listed in a case-insensitive sorted order.

-o, --outdated

List outdated packages

(environment variable: PIP_OUTDATED)

-u, --uptodate

List uptodate packages

(environment variable: PIP_UPTODATE)

-e, --editable

List editable projects.

(environment variable: PIP_EDITABLE)

-l, --local

If in a virtualenv that has global access, do not list globally-installed packages.

(environment variable: PIP_LOCAL)

--user

Only output packages installed in user-site.

(environment variable: PIP_USER)

--path <path>

Restrict to the specified installation path for listing packages (can be used multiple times).

(environment variable: PIP_PATH)

--pre

Include pre-release and development versions. By default, pip only finds stable versions.

(environment variable: PIP_PRE)

--format <list_format>

Select the output format among: columns (default), freeze, or json. The ‘freeze’ format cannot be used with the --outdated option.

(environment variable: PIP_FORMAT)

--not-required

List packages that are not dependencies of installed packages.

(environment variable: PIP_NOT_REQUIRED)

--exclude-editable

Exclude editable package from output.

(environment variable: PIP_EXCLUDE_EDITABLE)

--include-editable

Include editable package from output.

(environment variable: PIP_INCLUDE_EDITABLE)

--exclude <package>

Exclude specified package from the output

(environment variable: PIP_EXCLUDE)

-i, --index-url <url>

Base URL of the Python Package Index (default https://pypi.org/simple). This should point to a repository compliant with PEP 503 (the simple repository API) or a local directory laid out in the same format.

(environment variable: PIP_INDEX_URL, PIP_PYPI_URL)

Extra URLs of package indexes to use in addition to --index-url. Should follow the same rules as --index-url.

(environment variable: PIP_EXTRA_INDEX_URL)

--no-index

Ignore package index (only looking at --find-links URLs instead).

(environment variable: PIP_NO_INDEX)

-f, --find-links <url>

If a URL or path to an html file, then parse for links to archives such as sdist (.tar.gz) or wheel (.whl) files. If a local path or file:// URL that’s a directory, then look for archives in the directory listing. Links to VCS project URLs are not supported.

(environment variable: PIP_FIND_LINKS)

When some packages are installed in editable mode, pip list outputs an additional column that shows the directory where the editable project is located (i.e. the directory that contains the pyproject.toml or setup.py file).

The json format outputs an additional editable_project_location field.

$ python -m pip list --format=json | python -m json.tool
[
 {
 "name": "pip",
 "version": "21.2.4",
 },
 {
 "name": "pip-test-package",
 "version": "0.1.1",
 "editable_project_location": "/home/you/.venv/src/pip-test-package"
 },
 {
 "name": "setuptools",
 "version": "57.4.0"
 },
 {
 "name": "wheel",
 "version": "0.36.2"
 }
]
C:\> py -m pip list --format=json | py -m json.tool
[
 {
 "name": "pip",
 "version": "21.2.4",
 },
 {
 "name": "pip-test-package",
 "version": "0.1.1",
 "editable_project_location": "C:\Users\You\.venv\src\pip-test-package"
 },
 {
 "name": "setuptools",
 "version": "57.4.0"
 },
 {
 "name": "wheel",
 "version": "0.36.2"
 }
]

Note

Contrary to the freeze command, pip list --format=freeze will not report editable install information, but the version of the package at the time it was installed.