Dump the software license list of Python packages installed with pip.
Maintained. Last release 7 months ago, commits in 25 of the last 26 weeks. Weaker on release cadence and contributor spread.
pip install pip-licenses-clipip-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 .
Additionally, you can set to override the encoding used for .