jupyder笔记本:OSError:[Errno 2]“dot”未在路径中找到

2024-10-03 02:47:20 发布

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

我使用jupyder笔记本:

from IPython import display
graph = net_drawer.GetPydotGraph(train_model.net.Proto().op, 'mnist', rankdir='LR')
#graph.write_png("lenet.png")
display.Image(graph.create_png(), width=800)

我遇到了这样一个错误:

^{pr2}$

我可以在终端和pycharm中成功运行代码,但在jupyder笔记本中失败。 你能帮帮我吗?谢谢! 此外,我还成功地安装了dot,如:

sudo apt-get insall graphviz
pip install pydot

Tags: fromimportnetmodelpngipythondisplay笔记本