2025, Dec 14 17:00

Resolve 'dot is not recognized' on Windows by installing Graphviz and adding its bin to PATH

Seeing 'dot is not recognized' after pip install graphviz on Windows? Install Graphviz binaries, add bin to PATH, restart the terminal, confirm with dot -v.

Windows, Graphviz, and the elusive dot: why pip install isn't enough

You install graphviz via pip on Windows, the package shows up just fine in site-packages, and then any tool that tries to render graphs bombs with “dot is not recognized as an internal or external command”. Even a direct call to dot fails in both CMD and Git Bash. What gives?

Symptom, reproduced

First, the Python package is present:

pip show graphviz
Name: graphviz
Version: 0.20.3
Summary: Simple Python interface for Graphviz
Home-page: https://github.com/xflr6/graphviz
Author: Sebastian Bank
Author-email: sebastian.bank@uni-leipzig.de
License: MIT
Location: c:\applics\python 3.9\lib\site-packages
Requires:

Then a tool that shells out to Graphviz fails because dot isn’t on the PATH:

pydeps sample_pkg/ --max-bacon=4
'dot' is not recognized as an internal or external command,
operable program or batch file.

Calling dot directly in CMD doesn’t work either:

dot -v
'dot' is not recognized as an internal or external command,
operable program or batch file.

Git Bash behaves the same way:

dot -v
bash: dot: command not found

What’s actually wrong

The Python graphviz package is not the Graphviz program. It’s a Python wrapper that interfaces with the external Graphviz software. The dot executable lives in the Graphviz installation, not in the Python package. If the Graphviz binaries aren’t installed and their bin folder isn’t on the PATH, Windows cannot run dot, so any tooling that relies on it fails with the “not recognized” error.

How to fix it on Windows

Install the actual Graphviz build for Windows and make its executables discoverable by your shell. Download and extract the Windows 64-bit zip from the official release channel:

https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/12.2.1/windows_10_cmake_Release_Graphviz-12.2.1-win64.zip

After extracting, add the extracted bin directory to your PATH. Then restart the terminal so the updated PATH is picked up, and verify that dot is now available:

dot -v

Why this matters

On Windows, many developer tools invoke external executables rather than embedding them. A Python package with the same name does not imply the system-level tool is present. If you only pip install graphviz, you end up with a Python interface but no dot executable on the PATH, which breaks any workflow that needs to render graphs.

Takeaways

If you hit “dot is not recognized” after installing the Python package, install the Graphviz Windows build, add its bin folder to PATH, restart your terminal, and validate with dot -v. Keep in mind the separation of concerns: the Python package provides bindings, while the Graphviz program supplies the dot binary that actually does the graph layout work.