(Search) (../../search/) (Copyright) (../../copyright/) (pip show) (../pip_show/) (pip inspect) (../pip_inspect/) pip list - pip documentation v24.3.dev0 (../../_static/pygments.css?v=a746c00c) (../../_static/styles/furo.css?v=354aac6f) (../../_static/copybutton.css?v=76b2166b) (../../_static/tabs.css?v=4c969af8) (/_/static/css/badge_only.css) (../../_static/styles/furo-extensions.css?v=302659d7) (/_/static/css/readthedocs-doc-embed.css) Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Hide navigation sidebar Hide table of contents sidebar Skip to content Toggle site navigation sidebar (../../) pip documentation v24.3.dev0 Toggle Light / Dark / Auto color theme Toggle table of contents sidebar (../../) pip documentation v24.3.dev0 (Search) (yes) (default) (../../getting-started/) Getting Started (../../installation/) Installation (../../user_guide/) User Guide (../../topics/) Topic Guides Toggle navigation of Topic Guides (../../topics/authentication/) Authentication (../../topics/caching/) Caching (../../topics/configuration/) Configuration (../../topics/dependency-resolution/) Dependency Resolution (../../topics/more-dependency-resolution/) More on Dependency Resolution (../../topics/https-certificates/) HTTPS Certificates (../../topics/local-project-installs/) Local project installs (../../topics/repeatable-installs/) Repeatable Installs (../../topics/secure-installs/) Secure installs (../../topics/vcs-support/) VCS Support (../../topics/python-option/) Managing a different Python interpreter (../../topics/workflow/) Pip is not a workflow management tool (../../reference/) Reference Toggle navigation of Reference (../../reference/build-system/) Build System Interface Toggle navigation of Build System Interface (../../reference/build-system/pyproject-toml/) pyproject.toml (../../reference/build-system/setup-py/) setup.py (legacy) (../../reference/requirement-specifiers/) Requirement Specifiers (../../reference/requirements-file-format/) Requirements File Format (../../reference/installation-report/) Installation Report (../../reference/inspect-report/) pip inspect JSON output specification (../) Commands Toggle navigation of Commands (../pip/) pip (../pip_install/) pip install (../pip_uninstall/) pip uninstall (../pip_inspect/) pip inspect pip list (../pip_show/) pip show (../pip_freeze/) pip freeze (../pip_check/) pip check (../pip_download/) pip download (../pip_wheel/) pip wheel (../pip_hash/) pip hash (../pip_search/) pip search (../pip_cache/) pip cache (../pip_config/) pip config (../pip_debug/) pip debug Project (../../development/) Development Toggle navigation of Development (../../development/getting-started/) Getting Started (../../development/contributing/) Contributing (../../development/ci/) Continuous Integration (../../development/issue-triage/) Issue Triage (../../development/architecture/) Architecture of pip’s internals Toggle navigation of Architecture of pip’s internals (../../development/architecture/overview/) Broad functionality overview (../../development/architecture/anatomy/) Repository anatomy & directory structure (../../development/architecture/configuration-files/) Configuration File Handling (../../development/architecture/package-finding/) Finding and choosing files (index and PackageFinder ) (../../development/architecture/command-line-interface/) Command Line Interface (../../development/architecture/upgrade-options/) Options that control the installation process (../../development/release-process/) Release process (../../development/vendoring-policy/) Vendoring Policy (../../ux-research-design/) UX Research & Design Toggle navigation of UX Research & Design (../../ux-research-design/contribute/) How to Contribute (../../ux-research-design/guidance/) UX Guidance (../../ux-research-design/research-results/) UX Research Results Toggle navigation of UX Research Results (../../ux-research-design/research-results/about-our-users/) About pip’s Users (../../ux-research-design/research-results/mental-models/) How Users Understand pip (../../ux-research-design/research-results/users-and-security/) How pip users think about security (../../ux-research-design/research-results/ci-cd/) How pip is used in interactive environments (i.e. CI, CD) (../../ux-research-design/research-results/personas/) pip Personas (../../ux-research-design/research-results/prioritizing-features/) Prioritizing pip Features (../../ux-research-design/research-results/override-conflicting-dependencies/) Providing an override to install packages with conflicting dependencies (../../ux-research-design/research-results/pip-force-reinstall/) pip --force-reinstall (../../ux-research-design/research-results/pip-search/) pip search (../../ux-research-design/research-results/pip-upgrade-conflict/) pip Upgrade Conflict (../../ux-research-design/research-results/improving-pips-documentation/) Improving pip’s Documentation (../../news/) Changelog (https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md) Code of Conduct (https://github.com/pypa/pip) GitHub v: latest v: latest Versions (https://pip.pypa.io/en/latest/cli/pip_list/) latest (https://pip.pypa.io/en/stable/cli/pip_list/) stable On Read the Docs (//readthedocs.org/projects/pip/) Project Home (//readthedocs.org/projects/pip/builds/) Builds (//readthedocs.org/projects/pip/downloads/) Downloads On GitHub (https://github.com/pypa/pip/blob/main/docs/html/cli/pip_list.rst) View (https://github.com/pypa/pip/edit/main/docs/html/cli/pip_list.rst) Edit Search (Search docs) Hosted by (https://readthedocs.org) Read the Docs · (https://docs.readthedocs.io/page/privacy-policy.html) Privacy Policy Back to top (../../_sources/cli/pip_list.rst.txt) (View this page) View this page (https://github.com/pypa/pip/edit/main/docs/html/cli/pip_list.rst) (Edit this page) Edit this page Toggle Light / Dark / Auto color theme Toggle table of contents sidebar pip list(Link to this heading) ¶ Usage(Link to this heading) ¶ Unix/macOS python - m pip list [ options ] Copy to clipboard Windows py - m pip list [ options ] Copy to clipboard Description(Link to this heading) ¶ List installed packages, including editables. Packages are listed in a case-insensitive sorted order. Options(Link to this heading) ¶ -o , --outdated (Link to this definition) ¶ List outdated packages (environment variable: PIP_OUTDATED ) -u , --uptodate (Link to this definition) ¶ List uptodate packages (environment variable: PIP_UPTODATE ) -e , --editable (Link to this definition) ¶ List editable projects. (environment variable: PIP_EDITABLE ) -l , --local (Link to this definition) ¶ If in a virtualenv that has global access, do not list globally-installed packages. (environment variable: PIP_LOCAL ) --user (Link to this definition) ¶ Only output packages installed in user-site. (environment variable: PIP_USER ) --path (Link to this definition) ¶ Restrict to the specified installation path for listing packages (can be used multiple times). (environment variable: PIP_PATH ) --pre (Link to this definition) ¶ Include pre-release and development versions. By default, pip only finds stable versions. (environment variable: PIP_PRE ) --format (Link to this definition) ¶ 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 (Link to this definition) ¶ List packages that are not dependencies of installed packages. (environment variable: PIP_NOT_REQUIRED ) --exclude-editable (Link to this definition) ¶ Exclude editable package from output. (environment variable: PIP_EXCLUDE_EDITABLE ) --include-editable (Link to this definition) ¶ Include editable package from output. (environment variable: PIP_INCLUDE_EDITABLE ) --exclude (Link to this definition) ¶ Exclude specified package from the output (environment variable: PIP_EXCLUDE ) -i , --index-url (Link to this definition) ¶ Base URL of the Python Package Index (default (https://pypi.org/simple) 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-index-url (Link to this definition) ¶ 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 (Link to this definition) ¶ Ignore package index (only looking at --find-links URLs instead). (environment variable: PIP_NO_INDEX ) -f , --find-links (Link to this definition) ¶ 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://) 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 ) Examples(Link to this heading) ¶ List installed packages (with the default column formatting). Unix/macOS $ python -m pip list Package Version ------- ------- docopt 0.6.2 idlex 1.13 jedi 0.9.0 Copy to clipboard Windows C:\> py -m pip list Package Version ------- ------- docopt 0.6.2 idlex 1.13 jedi 0.9.0 Copy to clipboard List outdated packages with column formatting. Unix/macOS $ python -m pip list --outdated --format columns Package Version Latest Type ---------- ------- ------ ----- retry 0.8.1 0.9.1 wheel setuptools 20.6.7 21.0.0 wheel Copy to clipboard Windows C:\> py -m pip list --outdated --format columns Package Version Latest Type ---------- ------- ------ ----- retry 0.8.1 0.9.1 wheel setuptools 20.6.7 21.0.0 wheel Copy to clipboard List packages that are not dependencies of other packages. Can be combined with other options. Unix/macOS $ python -m pip list --outdated --not-required Package Version Latest Type -------- ------- ------ ----- docutils 0.14 0.17.1 wheel Copy to clipboard Windows C:\> py -m pip list --outdated --not-required Package Version Latest Type -------- ------- ------ ----- docutils 0.14 0.17.1 wheel Copy to clipboard Use json formatting Unix/macOS $ python -m pip list --format= json [{'name': 'colorama', 'version': '0.3.7'}, {'name': 'docopt', 'version': '0.6.2'}, ... Copy to clipboard Windows C:\> py -m pip list --format=json [{'name': 'colorama', 'version': '0.3.7'}, {'name': 'docopt', 'version': '0.6.2'}, ... Copy to clipboard Use freeze formatting Unix/macOS $ python -m pip list --format= freeze colorama==0.3.7 docopt==0.6.2 idlex==1.13 jedi==0.9.0 Copy to clipboard Windows C:\> py -m pip list --format=freeze colorama==0.3.7 docopt==0.6.2 idlex==1.13 jedi==0.9.0 Copy to clipboard List packages installed in editable mode 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). Unix/macOS $ python -m pip list Package Version Editable project location ---------------- -------- ------------------------------------- pip 21.2.4 pip-test-package 0.1.1 /home/you/.venv/src/pip-test-package setuptools 57.4.0 wheel 0.36.2 Copy to clipboard Windows C:\> py -m pip list Package Version Editable project location ---------------- -------- ---------------------------------------- pip 21.2.4 pip-test-package 0.1.1 C:\Users\You\.venv\src\pip-test-package setuptools 57.4.0 wheel 0.36.2 Copy to clipboard The json format outputs an additional editable_project_location field. Unix/macOS $ 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" } ] Copy to clipboard Windows 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" } ] Copy to clipboard 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. (../pip_show/) Next pip show (../pip_inspect/) Previous pip inspect (../../copyright/) Copyright © The pip developers Made with (https://www.sphinx-doc.org/) Sphinx and (https://pradyunsg.me) @pradyunsg 's (https://github.com/pradyunsg/furo) Furo (https://readthedocs.org/projects/pip) (https://github.com/pypa/pip) On this page pip list Usage Description Options Examples