【发布时间】:2017-07-13 10:10:18
【问题描述】:
我必须在 Jupyter 笔记本上运行以下代码。
from graphviz import Digraph
dot = Digraph(comment='The Round Table')
dot.node('A', 'King Arthur')
dot.node('B', 'Sir Bedevere the Wise')
dot.node('L', 'Sir Lancelot the Brave')
dot.edges(['AB', 'AL'])
dot.edge('B', 'L', constraint='false')
print(dot.source)
dot.render('test-output/round-table.gv', view=True)
我必须事先安装 graphviz。在我在 Windows 10 上安装了 graphviz 2.38 之后。我做了“pip install graphviz” 以及“conda install graphviz”。但我得到这个错误
“RuntimeError: failed to execute ['dot', '-Tsvg'], 请确保 Graphviz 可执行文件在您的系统路径上”
我还应该做些什么来消除这个错误?
【问题讨论】: