Skip to main content

pip-licenses-cli

Dump the software license list of Python packages installed with pip.

Description

pip-licenses-cli is a CLI tool for checking the software licenses of installed Python packages with pip.

Implemented with the idea inspired by composer licenses command in Composer (a.k.a PHP package management tool): https://getcomposer.org/doc/03-cli.md#licenses

This is a fork of the original pip-licenses project. While pip-licenses-cli provides a CLI, pip-licenses-lib provides the library functionality. The CLI builds upon the library.

pip-licenses-cli is usable as a drop-in replacement for pip-licenses<=5.0.0. More recent versions might be compatible, but use a partially different code base and possibly other/additional parameters for example.

The initial goal was to provide a drop-in replacement for the unmaintained pip-licenses package. In the meantime, the original package got a new maintainer. This fork will continue to be maintained as usual.

Installation

You can install this package from PyPI:

python -m pip install pip-licenses-cli

If you want to additionally parse license declarations with SPDX expressions, then also install the spdx extra:

python -m pip install 'pip-licenses-cli[spdx]'

Alternatively, you can use the package from source directly after installing the required dependencies.

Usage

Execute the command with your venv (or virtualenv) environment.

# Install packages in your venv environment
(venv) $ pip install Django pip-licenses-cli

# Check the licenses with your venv environment
(venv) $ pip-licenses
 Name    Version  License
 Django  2.0.2    BSD
 pytz    2017.3   MIT

For further details, see the detailed docs.

About UnicodeEncodeError

If a UnicodeEncodeError occurs, check your environment variables LANG and LC_TYPE. Additionally, you can set PYTHONIOENCODING to override the encoding used for stdout.

This mostly occurs in isolated environments such as Docker and tox.

See useful reports:

Dependencies

pip-licenses-cli has been implemented in the policy to minimize the dependencies on external packages.

  • pip-licenses-lib by the same authors as the CLI (MIT License).
  • prettytable by Luke Maurits, subject to the BSD-3-Clause License.
    • Note: This package implicitly requires wcwidth by Jeff Quast (MIT License), which itself contains data derived from the Unicode standard (Unicode-3.0 License).
  • For Python < 3.11: tomli by Taneli Hukkinen under the MIT License.

If you are using SPDX support with the spdx extra, the following additional dependencies are required:

Contributing

See contribution guidelines.

License

This package is subject to the terms of the MIT license.

Disclaimer

All results are generated automatically from the data supplied by the corresponding package maintainers and provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. No generated content should be considered or used as legal advice. Consult an Attorney for any legal advice.

Metadata

Release files for pip-licenses-cli 4.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pip-licenses-cli 4.1.0
File Size Uploaded
pip_licenses_cli-4.1.0.tar.gz 24.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pip-licenses-cli 4.1.0
File Interpreter ABI Platform
pip_licenses_cli-4.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.1 kB

Release files / pip_licenses_cli-4.1.0.tar.gz

Download URL pip_licenses_cli-4.1.0.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8a07b33d59346944bffcd12abfb81070591abf362c597d0e044d61178d628d68
BLAKE2b-256 checksum
How to use checksums
2e67e50a77ab33449777a37fcbf075a412a38423859bc9c051682b83ad640069
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 6, 2026.

Transparency log

Release files / pip_licenses_cli-4.1.0-py3-none-any.whl

Download URL pip_licenses_cli-4.1.0-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76ccd6882cdbb446ed41bd8bd157b201905f191c0532e1aeaa9ba6de6199c3e3
BLAKE2b-256 checksum
How to use checksums
153f4653d7c5ed839b5dc10c1adc6a2e7f93aa17bbc95ded5f04f013864618b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

4.1.0 This release

2 release files

4.0.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page