I am running Python3.4 on Windows 7. I am trying to use the Python interface for graphviz. This is the script I intend to run:
from graphviz import Digraph import pydotplus dot = Digraph(comment='The Round Table') dot.node('A', 'King Arthur') dot.node('B', 'Sir Bedevere the Wise') dot.node('L', 'Sir Lancelot the Brave') dot.edges(['AB', 'AL']) dot.edge('B', 'L', constraint='false') print(dot.source) dot.render('test-output/round-table.gv', view=True)
At runtime, the following error appears:
RuntimeError: failed to execute ['dot', '-Tpdf', '-O', 'test-output/round-table.gv'], make sure the Graphviz executables are on your systems' path
Now I'm sure I installed the correct dependencies correctly. At first I tried to set the correct environment variables. The graphviz executables are located in C: \ Program Files (x86) \ Graphviz2.37 \ bin , so I went to the "Environment Variables" section. There are two sections here: user variables and system variables. In the "System Variables" section, I clicked on the Path , and then clicked Edit and added ; C: \ Program Files (x86) \ Graphviz2.37 \ bin at the end of the line and saved. This did not fix the error.
Then, after the answer here , I uninstalled pydot (I actually use pydotplus here) and installed it again, but still did not succeed.
I tried to fix this for hours, and the whole PATH variable is just confused and frustrating.
source share