Why is pydot unable to find GraphViz's executables in Windows 8?
Solution 1
This happened because I had installed graphviz after I had installed pydot. Hence, pydot wasn't able to find it. Reinstalling it in the correct order solved the problem.
Solution 2
On Mac brew install graphviz
solved the problem for me.
Solution 3
I tried adding PATH via Control Panel, but restarting the command prompt is also needed. The following also works for updating the path in a Notebook session without exiting:
import os
os.environ["PATH"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin/'
Solution 4
in my case answer from Sadik pydot and graphviz error: Couldn't import dot_parser, loading of dot files will not be possible worked for me on Ubuntu 12.04.5 LTS
sudo apt-get install python-pydot
Solution 5
You need to install from Graphviz and then just add the path of folder where you installed Graphviz and its bin directory to system environments path.
web_ninja
Updated on July 05, 2022Comments
-
web_ninja almost 2 years
I have GraphViz 2.32 installed in Windows 8 and have added C:\Program Files (x86)\Graphviz2.32\bin to the System PATH variable. Still pydot is unable to find its executables.
Traceback (most recent call last): File "<pyshell#26>", line 1, in <module> graph.write_png('example1_graph.png') File "build\bdist.win32\egg\pydot.py", line 1809, in <lambda> lambda path, f=frmt, prog=self.prog : self.write(path, format=f, prog=prog)) File "build\bdist.win32\egg\pydot.py", line 1911, in write dot_fd.write(self.create(prog, format)) File "build\bdist.win32\egg\pydot.py", line 1953, in create 'GraphViz\'s executables not found' ) InvocationException: GraphViz's executables not found
I found this https://code.google.com/p/pydot/issues/detail?id=65 but am unable to get the problem solved.
-
boldnik over 9 yearsyou'd better use
virtualenv
-
danio over 7 yearsYou don't have to restart the whole computer, just the program that you want to use. Which is probably the command prompt you are running the notebook server from.
-
dmitry about 7 yearsI should notice that the else clause you've pointed is not reached always. So I added explicit path at the start of the
find_grapviz()
. Very dirty solution of course, but stupid time waste I've made while trying to get things working is so irritating. So this is in fact good hack. -
Dr.PP almost 7 yearsI followed your instructions in Windows 10, but Windows did not add my module path (which is in google drive) to the path list even though it showed at the Window. One way to check if your path is actually added to path list is to open a new terminal and run "path".
-
Mikebarson almost 7 yearsWorked for me! Thanks!
-
0 _ almost 7 yearsThe order in which
pydot
and GraphViz are installed does not make a difference to whetherpydot
can find GraphViz. GraphViz executables should be in the current path, in order forpydot
to be able to detect them. -
SND over 6 yearsThis solved it for me. Note: as already running applications might not automatically adapt to the updated environment, you should restart any application that requires the new path (see How do you add a windows environment variable without rebooting).
-
Akash Kandpal about 6 yearsOrder does not matters :)
-
Simeon almost 6 yearssudo aptitude install graphviz works respectively on ubuntu (18)
-
Supamee almost 6 yearsanyone have any idea why my graphviz folder has no bin folder? only pycache and the .py files
-
Siddharth Thanga Mariappan over 5 yearsIt is working in windows 10 machine. Thanks for sharing this code
-
albert about 5 yearsWhy twice the same answer stackoverflow.com/questions/28312534/… (i.e. double maintenance), better crosslink to other answer.
-
Huanfa Chen almost 5 yearsThis worked for me, associated with another step: add the folder containing the dot.exe executable file in the path variable.
-
Vinay billa over 4 yearsOrder does not matter
-
Luba Weissmann over 4 yearsamazing! it helped! i tried everything - but this solved it! thank you!