pythonwindowsdot

Why graphviz does not work? 'dot' is not recognized as an internal or external command, operable program or batch file


I install graphviz on Windows with pip install.

Checked with 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:

If I try to run:

pydeps dusk_pizding/ --max-bacon=4

I got:

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

Also, dot executable is not found in CMD:

dot -v

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

In Gitbash, same not found:

dot -v
bash: dot: command not found

why?


Solution

  • Okay iam able to reproduce the issue. you haven't installed the actual Graphviz software that contains the dot executable. The Python package is just a wrapper that interfaces with the Graphviz program.

    1.Download and extract the zip -(win 64) https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/12.2.1/windows_10_cmake_Release_Graphviz-12.2.1-win64.zip

    2. Add bin folder to path.

    enter image description here

    3. Restart the terminal and type

    dot -v
    

    enter image description here