Command line utility to show dependency tree of packages.
Actively maintained. Last release 8 days ago, commits in 26 of the last 26 weeks. A safe choice.
pip install pipdeptreepipdeptree
pipdeptree displays installed Python packages as a dependency tree.
pip freeze shows a flat list; pipdeptree adds parent-child
relationships and reports dependency conflicts or cycles.
Quick start
pip install pipdeptree
pipdeptree
Flask==0.10.1
┣━━ ✓ itsdangerous required: >=0.21 installed: 0.24
┣━━ ✓ Jinja2 required: >=2.4 installed: 2.11.2
┃ ┗━━ ⚠ MarkupSafe required: >=0.23 installed: 0.22
┗━━ ✓ Werkzeug required: >=0.7 installed: 0.11.2
Find packages that require a dependency:
pipdeptree --reverse --packages markupsafe
Output as JSON, Mermaid, or Graphviz:
pipdeptree -o json
pipdeptree -o cyclonedx-json > environment.cdx.json
pipdeptree -o mermaid
pipdeptree -o graphviz-svg > deps.svg