问题:OSError: pydot failed to call GraphViz.Please install GraphViz (https://www.graphviz.org/) and ensure that its executables are in the $PATH.
下载graphviz-2.38.msi,安装完以后相应的d:/Graphviz2.38/bin目录地下就有可执行文件了。 
将d:/Graphviz2.38/bin目录加到系统环境变量中就OK啦 

做完了上述步骤,结果还是不行。可能需要在程序里加

import os
os.environ["PATH"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin'

还是不行的话,通常是因为在win下失败,错误提示是找不到“dot”程序,而不是"dot.exe"程序,这就好办了,找到pydot的源码,在pydot.py中找到类Dot
 

OSError: pydot failed to call GraphViz.Please install GraphViz

 

修改self.prog = 'dot'为self.prog = 'dot.exe',之后测试,成功运行例子

 

相关文章:

  • 2021-08-18
  • 2021-07-21
  • 2022-12-23
  • 2021-10-19
  • 2021-06-12
  • 2021-07-17
猜你喜欢
  • 2022-12-23
  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2022-01-25
  • 2021-09-19
  • 2021-07-13
相关资源
相似解决方案