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

前端 未结 27 2689
醉酒成梦
醉酒成梦 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:43

    I am not using a windows machine, I am on a linux platform. I ran across this executable-not-found issue in the context of using the python package pyAgrum for plotting bayesian networks. pyAgrum uses graphviz to plot the networks. I installed pyagrum and graphviz using the anaconda platform in a python 3.6.4 environment (i.e. conda install ).

    I found the executables in /conda/envs//bin directory. So, it was just a matter of getting my notebook kernel to find them.

    If you import os, use the command os.environ['PATH'].split(os.pathsep) to see the executable paths in which your environment is looking. If the path containing your graphviz executables isn't in there, you can add it by doing the following: os.environ['PATH'] += os.pathsep + .

    I imagine this solution will work outside of my context. The main downside to this solution is that you need to do it every time you restart the kernel.

提交回复
热议问题