pipdeptree
Command line utility to show dependency tree of packages.
What it is and what it does
pipdeptree is a command-line tool that transforms pip's flat package list into a tree structure, exposing the parent-child dependency relationships that pip freeze hides. It detects and reports version conflicts (when a package requires a version different from what is installed) and dependency cycles, making it easier to understand and debug complex dependency graphs.
The tool works in two modes: inspecting the current environment's installed packages, or resolving dependencies offline from a lock file (PEP 751 format) or from a package index without installation. It supports multiple output formats—plain text with visual tree markers, JSON for programmatic consumption, and diagram formats like Mermaid and Graphviz for visualization. It can also generate summaries showing package counts, tree depth, conflicts, cycles, licenses, and sizes.
Use it for:
- Debug version conflicts when a transitive dependency is installed at a version that doesn't satisfy a parent's requirement.
- Visualize the full dependency graph of a project before installing to understand what will be pulled in.
- Detect circular dependencies that might cause installation or runtime issues.
- Generate a dependency diagram in SVG or Mermaid format for documentation or architecture review.
- Audit installed packages to understand which top-level packages depend on a specific library.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pipdeptree displays installed Python packages as a hierarchical dependency tree, showing parent-child relationships and reporting conflicts or cycles, with output options including JSON, Mermaid, and Graphviz formats.
Yes. pipdeptree is actively maintained, has no known vulnerabilities, and solves a real problem that pip freeze does not address. The MIT license is permissive, and medium install friction is acceptable for a development tool. Install it if you regularly need to understand or troubleshoot Python dependency relationships.
Install
pipdeptree on PyPI
pip
pip install pipdeptreeuv
uv add pipdeptreepoetry
poetry add pipdeptreeInstalling pipdeptree
Before you install
Medium install friction due to Rust-based compilation (classifiers include Programming Language :: Rust), though pre-built wheels are available for common platforms. Active maintenance with a release 14 days ago and 3019 repository stars.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial contexts.
Quickstart
pip install pipdeptree
pipdeptree
# Show reverse dependencies for a package:
pipdeptree --reverse --packages markupsafe
# Output as JSON:
pipdeptree -o json
Requires Python 3.10 or later; depends on nab-index and nab-python runtime dependencies.
Verify before relying
- Whether nab-index and nab-python are pure-Python or compiled, and their availability on all target platforms.
- Performance characteristics when analyzing large dependency trees or complex resolution scenarios.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 2 — nab-index, nab-python |
| Maintenance | actively maintained — 14 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 8,843,679/month — #1,589 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pipdeptree-4.2.0-cp310-abi3-macosx_10_15_x86_64.whl; pipdeptree-4.2.0-cp310-abi3-macosx_11_0_arm64.whl; pipdeptree-4.2.0-cp310-abi3-manylinux_2_28_aarch64.whl; pipdeptree-4.2.0-cp310-abi3-manylinux_2_28_x86_64.whl; pipdeptree-4.2.0-cp310-abi3-musllinux_1_2_aarch64.whl; pipdeptree-4.2.0-cp310-abi3-musllinux_1_2_x86_64.whl; pipdeptree-4.2.0-cp310-abi3-win_amd64.whl; pipdeptree-4.2.0-cp314-cp314t-macosx_10_15_x86_64.whl; pipdeptree-4.2.0-cp314-cp314t-macosx_11_0_arm64.whl; pipdeptree-4.2.0-cp314-cp314t-manylinux_2_28_aarch64.whl; pipdeptree-4.2.0-cp314-cp314t-manylinux_2_28_x86_64.whl; pipdeptree-4.2.0-cp314-cp314t-musllinux_1_2_aarch64.whl; pipdeptree-4.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl; pipdeptree-4.2.0-cp314-cp314t-win_amd64.whl; pipdeptree-4.2.0-cp315-cp315t-macosx_10_15_x86_64.whl; pipdeptree-4.2.0-cp315-cp315t-macosx_11_0_arm64.whl; pipdeptree-4.2.0-cp315-cp315t-manylinux_2_28_aarch64.whl; pipdeptree-4.2.0-cp315-cp315t-manylinux_2_28_x86_64.whl; pipdeptree-4.2.0-cp315-cp315t-musllinux_1_2_aarch64.whl; pipdeptree-4.2.0-cp315-cp315t-musllinux_1_2_x86_64.whl
Keywords: application, cache, directory, log, user
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
pip-autoremoveA command-line tool that uninstalls a package…
permissive · top 15,000 on PyPI
pydepsVisualizes Python module dependencies as graphs…
permissive · top 15,000 on PyPI
importlabImportlab infers Python import dependencies and…
permissive · top 5,000 on PyPI
johnnydepJohnnydep displays the full dependency tree of…
permissive · top 15,000 on PyPI
py-import-cyclesDetects import cycles in Python projects by…
permissive · top 15,000 on PyPI
cyclicDetects and reports cyclic relationships in a…
permissive · top 15,000 on PyPI
bigtreeBigtree provides tree, binary tree, and…
permissive · top 15,000 on PyPI
dependency-groupsParses and resolves PEP 735 dependency groups…
permissive · top 5,000 on PyPI
poetry-plugin-exportExports Poetry's locked dependency tree to…
permissive · top 1,000 on PyPI
pipreqs-fivetranScans Python project source files and Jupyter…
permissive · top 15,000 on PyPI