dtreeviz
A Python 3 library for sci-kit learn, XGBoost, LightGBM, Spark, and TensorFlow decision tree visualization
Decision gist · record as of 2026-08-14
Yes, if you work with tree-based models and need to visualize or interpret them. The library is stable, permissively licensed, and has low install friction. The aging maintenance status (no release in 224 days) is a minor concern if you rely on cutting-edge framework versions, but core functionality remains sound for current releases.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires graphviz system library to be installed separately on your machine for rendering to work.
- Low friction install with six common data-science dependencies (graphviz, pandas, numpy, scikit-learn, matplotlib, colour).
- Maintenance status is aging—last release was 224 days ago—but the repository remains active with 3154 stars.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute dtreeviz with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2026-01-02 (224 days) · last repo commit 2026-01-02 · 3,154 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 84,225 downloads/mo, #14,014 on PyPI
Alternatives
Verify before relying
pip install dtreeviz
from dtreeviz.trees import dtreeviz
viz = dtreeviz(tree_model, X, y, feature_names=feature_names, class_names=class_names)- Whether the aging maintenance status (224 days since last release) affects support for newer versions of supported frameworks.
- Performance characteristics when visualizing very large or deeply nested trees.
- Current compatibility with TensorFlow decision forests given the maintenance timeline.
What it is and what it does
dtreeviz is a Python visualization library that transforms decision trees from popular machine learning frameworks into clear, interpretable diagrams. It supports scikit-learn, XGBoost, LightGBM, Spark MLlib, and TensorFlow, making it a bridge between model training and human understanding. The library renders trees as visual graphs that show how features split at each node and how predictions flow through the model, inspired by educational design principles.
The package depends on graphviz for rendering, pandas and numpy for data handling, scikit-learn for tree structure access, matplotlib for graphics, and colour for visual styling. It's primarily used by data scientists and ML engineers who need to explain model behavior to stakeholders, debug model decisions, or learn how tree-based models work internally.
Use it for
- Visualize a trained decision tree to understand which features matter most at each split.
- Generate publication-quality diagrams of trees for model documentation and reports.
- Debug predictions by inspecting the decision paths individual trees take.
- Teach machine learning concepts by showing how decision trees partition feature space visually.
- Interpret model behavior for regulatory or compliance audits by displaying exact decision logic.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with tree-based models and need to visualize or interpret them.
The library is stable, permissively licensed, and has low install friction. The aging maintenance status (no release in 224 days) is a minor concern if you rely on cutting-edge framework versions, but core functionality remains sound for current releases.
Install
dtreeviz on PyPI
Before you install
Low friction install with six common data-science dependencies (graphviz, pandas, numpy, scikit-learn, matplotlib, colour). Maintenance status is aging—last release was 224 days ago—but the repository remains active with 3154 stars.
Requires graphviz system library to be installed separately on your machine for rendering to work.
License in practice
MIT license is permissive; you can use, modify, and distribute dtreeviz with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install dtreeviz
from dtreeviz.trees import dtreeviz
viz = dtreeviz(tree_model, X, y, feature_names=feature_names, class_names=class_names)
Verify before relying
- Whether the aging maintenance status (224 days since last release) affects support for newer versions of supported frameworks.
- Performance characteristics when visualizing very large or deeply nested trees.
- Current compatibility with TensorFlow decision forests given the maintenance timeline.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesgraphvizpandasnumpyscikit-learnmatplotlibcolour |
| Maintenance | Aging 224 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,225 / month, #14,014 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT License |
Evidence: dtreeviz-2.3.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “decision tree visualization”
- dtreevizdtreeviz renders decision trees from scikit-learn, XGBoost, LightGBM,…
- py_treespy_trees implements behaviour trees in Python, providing composable…
- asciitreeRenders tree data structures as formatted ASCII art for display in…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also py_trees · tensorflow-decision-forests · treeinterpreter · ydf · xgboost · lightgbm · treelite · skope-rules · ete3 · treescope