pygraphviz ValueError: Program dot not found in path [duplicate]

╄→尐↘猪︶ㄣ 提交于 2019-12-01 18:14:30

问题


the problem is: I am on Windows7 and I've installed pygraphviz library and Graphviz application(Graphviz application is in "C:\Program Files"). When I run my program on python I have the following message:

g.draw(filename,prog='dot')
  File "C:\Python27\lib\site-packages\pygraphviz\agraph.py", line 1418, in draw
    data=self._run_prog(prog,args)
  File "C:\Python27\lib\site-packages\pygraphviz\agraph.py", line 1248, in _run_prog
    runprog=self._get_prog(prog)
  File "C:\Python27\lib\site-packages\pygraphviz\agraph.py", line 1236, in _get_prog
    raise ValueError("Program %s not found in path."%prog) 
ValueError: Program dot not found in path.

How can I solve this problem?


回答1:


You need to add the directory with graphviz binaries to PATH.



来源:https://stackoverflow.com/questions/15014465/pygraphviz-valueerror-program-dot-not-found-in-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!