--- id: pipdeptree version: "4.2.0" license: MIT license_treatment: permissive maintenance: active --- # pipdeptree — Command line utility to show dependency tree of packages. License: permissive · Maintenance: active · Downloads: 8.8M/mo ## 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 above — 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 pip install pipdeptree uv add pipdeptree 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_current - Install friction: medium - Maintenance: active - Downloads: 8.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags python dependency tree visualization, show package dependencies, pip dependency graph, resolve dependency conflicts, inspect installed packages, dependency cycle detection, package dependency analyzer, dependency-management, cli-tool, visualization [View on SkillFed](https://skillfed.io/packages/pipdeptree) · [View on PyPI](https://pypi.org/project/pipdeptree/)