将引擎从点更改为n时找不到graphviz路径变量

2024-06-16 10:39:29 发布

您现在位置:Python中文网/ 问答频道 /正文

为什么我在更换发动机时出错?点引擎一切正常。你知道吗

代码:

from graphviz import Graph

dot = Graph()
dot.engine = 'neato'

dot.node('a')
dot.node('b')

dot.edge('a', 'b')

print(dot.source)
dot.render('test-output/round-table.gv', view=True)

错误:

graphviz.backend.ExecutableNotFound: failed to execute 
['neato', '-Tpdf', '-O', 'test-output/round-table.gv'], 
make sure the Graphviz executables are on your systems' PATH

Tags: 代码fromtest引擎importnodeoutputtable