skillfed

pipdeptree

Command line utility to show dependency tree of packages.

pipdeptree v4.2.0 8.8M downloads/30d#1,589 on PyPI3,019
Permissive license MIT Active released

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 pipdeptree

uv

uv add pipdeptree

poetry

poetry add pipdeptree

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Rust

Tags

python dependency tree visualizationshow package dependenciespip dependency graphresolve dependency conflictsinspect installed packagesdependency cycle detectionpackage dependency analyzer
dependency-managementcli-toolvisualization

More Software Development packages