{"id":24239,"library":"pip-licenses-cli","title":"pip-licenses-cli","description":"A CLI tool to dump the software license list of Python packages installed with pip. Current version 4.0.0 requires Python >=3.10 and <4. It is a fork of pip-licenses with improved modularization and support for PEP 639 License-File field.","status":"active","version":"4.0.0","language":"python","source_language":"en","source_url":"https://github.com/stefan6419846/pip-licenses-cli","tags":["license","pip","cli","compliance"],"install":[{"cmd":"pip install pip-licenses-cli","lang":"bash","label":"Install via pip"},{"cmd":"pip install pip-licenses-cli[spdx]","lang":"bash","label":"Install with SPDX expression support"}],"dependencies":[{"reason":"Required to access installed packages metadata","package":"pip","optional":false},{"reason":"Used for table output formatting","package":"prettytable","optional":true},{"reason":"Used for reading pyproject.toml configuration on Python <3.11","package":"tomli","optional":true},{"reason":"Used for SPDX expression parsing","package":"boolean.py","optional":true}],"imports":[],"quickstart":{"code":"import subprocess\nresult = subprocess.run(['pip-licenses-cli', '--format=json', '--with-license-file', '--no-license-path'], capture_output=True, text=True)\nprint(result.stdout)","lang":"python","description":"Run pip-licenses-cli as a subprocess and capture JSON output including license files."},"warnings":[{"fix":"Update parsing logic to handle missing license entries. To restore old behavior, open an issue to request a flag.","message":"Version 4.0.0 changes behavior for packages with UNKNOWN license: they are now omitted from plain-vertical output and result in empty lists in JSON output, whereas previously they were included as UNKNOWN. This may break scripts relying on the old behavior.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Upgrade Python to 3.10 or later.","message":"Version 3.0.0 drops support for Python 3.9. Ensure your Python version is >=3.10.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Add --no-license-path if you want the license text inline.","message":"The --with-license-file flag combined with --no-license-path is the recommended way to include inline license texts. Using --with-license-file alone will print file paths instead.","severity":"deprecated","affected_versions":"all"},{"fix":"Use [tool.pip-licenses-cli] in pyproject.toml.","message":"Configuration from pyproject.toml is read from the [tool.pip-licenses-cli] section (not [tool.pip-licenses]). Using the wrong section name will silently ignore your config.","severity":"gotcha","affected_versions":"all"},{"fix":"Specify exact package names separated by commas.","message":"The --ignore-packages flag requires full package names (e.g., 'requests') not versioned or partial names.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install pip-licenses-cli'.","cause":"The package is not installed in the current environment.","error":"Command 'pip-licenses-cli' not found"},{"fix":"Do not import pip_licenses_cli as a Python module; use 'pip-licenses-cli' as a command-line tool.","cause":"Trying to import the package directly instead of running it as a CLI tool.","error":"ModuleNotFoundError: No module named 'pip_licenses_cli'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}