问题是: 我在Windows7上,我已经安装了pygraphviz库和Graphviz应用程序(Graphviz应用程序在“C:\ Program Files”中)。当我在python上运行我的程序时,我有以下消息:
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.
我该如何解决这个问题?
答案 0 :(得分:4)
您需要将包含graphviz二进制文件的目录添加到PATH
。