pip list

Usage


pip list [options]

Description

List installed packages, including editables.

Packages are listed in a case-insensitive sorted order.

Options

-o, --outdated

List outdated packages

-u, --uptodate

List uptodate packages

-e, --editable

List editable projects.

-l, --local

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

--user

Only output packages installed in user-site.

--pre

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

--format <list_format>

Select the output format among: columns (default), freeze, json, or legacy.

--not-required

List packages that are not dependencies of installed packages.

--exclude-editable

Exclude editable package from output.

--include-editable

Include editable package from output.

-i, --index-url <url>

Base URL of Python Package Index (default https://pypi.python.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.

--extra-index-url <url>

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

--no-index

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

-f, --find-links <url>

If a url or path to an html file, then parse for links to archives. If a local path or file:// url that's a directory, then look for archives in the directory listing.

Enable the processing of dependency links.

Examples

  1. List installed packages.

    $ pip list
    docutils (0.10)
    Jinja2 (2.7.2)
    MarkupSafe (0.18)
    Pygments (1.6)
    Sphinx (1.2.1)
    
  2. List outdated packages (excluding editables), and the latest version available.

    $ pip list --outdated
    docutils (Current: 0.10 Latest: 0.11)
    Sphinx (Current: 1.2.1 Latest: 1.2.2)
    
  3. List installed packages with column formatting.

    $ pip list --format columns
    Package Version
    ------- -------
    docopt  0.6.2
    idlex   1.13
    jedi    0.9.0
    
  4. List outdated packages with column formatting.

    $ pip list -o --format columns
    Package    Version Latest Type
    ---------- ------- ------ -----
    retry      0.8.1   0.9.1  wheel
    setuptools 20.6.7  21.0.0 wheel
    
  5. List packages that are not dependencies of other packages. Can be combined with other options.

    $ pip list --outdated --not-required
    docutils (Current: 0.10 Latest: 0.11)
    
  6. Use legacy formatting

    $ pip list --format=legacy
    colorama (0.3.7)
    docopt (0.6.2)
    idlex (1.13)
    jedi (0.9.0)
    
  7. Use json formatting

    $ pip list --format=json
    [{'name': 'colorama', 'version': '0.3.7'}, {'name': 'docopt', 'version': '0.6.2'}, ...
    
  8. Use freeze formatting

    $ pip list --format=freeze
    colorama==0.3.7
    docopt==0.6.2
    idlex==1.13
    jedi==0.9.0