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

前端 未结 27 2565
醉酒成梦
醉酒成梦 2020-11-27 14:26

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 executab

相关标签:
27条回答
  • 2020-11-27 14:45

    I am running a Windows 10 machine and had some problems, too. I installed graphviz via msi installer. Adding via System settings did not work for me.

    I removed the installation with the msi and used chocolatey, a windows package manager. Removing the installed version is necessary, otherwise chocolatey won't install.

    Now it runs fine. I would recommend doing it this way.

    0 讨论(0)
  • 2020-11-27 14:48

    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.

    0 讨论(0)
  • 2020-11-27 14:50

    On Mac brew install graphviz solved the problem for me.

    0 讨论(0)
  • 2020-11-27 14:52

    For me: (Win10, Anaconda3) Make sure you have done "conda install graphviz"

    I have to add to the PATH: C:\Users\username\Anaconda3\Library\bin\graphviz

    To modify PATH go to Control Panel > System and Security > System > Advanced System Settings > Environment Variables > Path > Edit > New

    MAKE SURE TO RESTART YOUR IDE AFTER THIS. It should work

    0 讨论(0)
  • 2020-11-27 14:53

    Some things to know about graphviz:

    1. graphviz is not only a python module, it's also a standalone program. I believe you need both to make graphviz to work.
    2. The standalone graphviz program was originally developed by AT&T, open sourced, then abandoned. The current maintainers of the package forgot to include Windows registry entries so Python can find the program executable.
    3. Line 620 of pydotplus\graphviz.py includes a backup path to look for graphviz if it isn't found in the registry. It uses the old ATT file path. Update the file path to what is on your machine (you will need to have administrator privileges) and graphviz should work with pydotplus.

    Example:

    # Just in case, try the default... path = r"C:\Program Files (x86)\Graphviz2.38\bin"

    0 讨论(0)
  • 2020-11-27 14:53

    I had this issue and noticed that it was printing my PATH with two sets of double-quotes. I worked around the problem by adding the following to Line 1959 of:

    C:\Anaconda\Lib\site-packages\pydot.py
    
    self.progs[prog] = os.path.normpath(self.progs[prog][1:-1])
    

    Obviously not the best fix but it got me through the day.

    0 讨论(0)
提交回复
热议问题