Graphviz Dot Binarys & Conf.py

Error messages

So I keep getting this error message with make html:

Warning, treated as error:
dot command 'dot' cannot be run (needed for graphviz output), check the graphviz_dot setting

and my vscode sphinx integration makes this complaint

File "c:\Users\story\Projects\matplotlib\doc\conf.py", line 80, in _check_dependencies
    raise OSError(
OSError: No binary named dot - graphviz must be installed to build the documentation

conf.py codepath

but the if statement that triggers that error is:

if shutil.which('dot') is None:
        raise OSError(
            "No binary named dot - graphviz must be installed to build the "
            "documentation")

verification that binary is installed/on path:

this works:

 shutil.which('dot')
Out[2]: 'C:\\Users\\story\\Anaconda3\\envs\\mplsrc\\Library\\bin\\dot.BAT'

as does:

(mplsrc) C:\Users\story\Projects\matplotlib\doc>dot -v
dot - graphviz version 2.38.0 (20140413.2041)
libdir = "C:\Users\story\Anaconda3\envs\mplsrc\Library\bin\graphviz"
Activated plugin library: gvplugin_dot_layout.dll
...

So uh, any ideas on what I’m missing here? Thanks

So worked out that the bug was that sphinx expects a graphviz_dot environment variable. I’m leaning towards option 3 fixed it, but this is what I tried:

  1. Setting graphviz_dot:
    https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#setting-environment-variables
  2. passing in graph_viz path argument:
    https://www.sphinx-doc.org/en/master/usage/extensions/graphviz.html#confval-graphviz_dot
  3. adding this line to conf.py:
graphviz_dot = shutil.which('dot')