Installation¶

graphviz provides a simple pure-Python interface for the Graphviz graph-drawing software. It runs under Python 3.8+. To install it with pip, run the following:

$ pip install graphviz

For a system-wide install, this typically requires administrator access. For an isolated install, you can run the same inside a venv or a virtualenv.

The only dependency is a working installation of Graphviz (download page, archived versions, installation procedure for Windows).

After installing Graphviz, make sure that its bin/ subdirectory containing the dot layout command for rendering graph descriptions is on your systems’ PATH (sometimes done by the installer; setting PATH on Linux, Mac, and Windows): On the command-line, dot -V should print the version of your Graphiz installation.

Platform: Windows

Windows users might want to check the status of known issues (gvedit.exe, sfdp, commands) and consider trying an older archived version as a workaround (e.g. graphviz-2.38.msi).

Platform: Anaconda

See the downstream conda-forge distribution conda-forge/python-graphviz (feedstock), which should automatically conda install conda-forge/graphviz (feedstock) as dependency.