Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is pydot unable to find GraphViz's executables in Windows 8?

People also ask

How do I add Pydot to path?

Type conda install pydot graphviz in cmd, and then add the executables location directory C:\Anaconda3\pkgs\graphviz-2.38-hfd603c8_2\Library\bin\graphviz to your system path variable. That works! It works!

How do you check if I have Graphviz installed?

Run "dot -V" from the command prompt. If GraphViz is installed and configured you'll get it's version.


The problem is that the path to GraphViz was not found by the pydot module as shown in the traceback:

'GraphViz\'s executables not found'

I solved this problem on my windows 7 machine by adding the GraphViz bin directory to my computer's PATH. Then restarting my python IDE to use the updated path.

  1. Install GraphViz if you haven't already (I used the MSI download)
  2. Get the path for gvedit.exe (for me it was "C:\Program Files (x86)\Graphviz2.34\bin\")
  3. Add this path to the computer's PATH
  4. One way to get to environment settings to set your path is to click on each of these button/menu options: start->computer->system properties->advanced settings->environment variables
  5. Click Edit User path
  6. Add this string to the end of your Variable value list (including semicolon): ;C:\Program Files (x86)\Graphviz2.34\bin
  7. Click OK
  8. Restart your Python IDE

On Mac brew install graphviz solved the problem for me.


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.


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/'