简体   繁体   English

jupyder notebook: OSError: [Errno 2] 在路径中找不到“点”

[英]jupyder notebook: OSError: [Errno 2] "dot" not found in path

I use jupyder notebook:我使用 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)

and I encounter this error:我遇到了这个错误:

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-11-95f1d8e2feb8> in <module>()
      2 graph = net_drawer.GetPydotGraph(train_model.net.Proto().op, 'mnist', rankdir='LR')
      3 #graph.write_png("lenet.png")
----> 4 display.Image(graph.create_png(), width=800)

/home/user/.local/lib/python2.7/site-packages/pydot.pyc in new_method(f, prog, encoding)
   1660                 """Refer to docstring of method `create`."""
   1661                 return self.create(
-> 1662                     format=f, prog=prog, encoding=encoding)
   1663             name = 'create_{fmt}'.format(fmt=frmt)
   1664             self.__setattr__(name, new_method)

/home/user/.local/lib/python2.7/site-packages/pydot.pyc in create(self, prog, format, encoding)
   1865                 args[1] = '"{prog}" not found in path.'.format(
   1866                     prog=prog)
-> 1867                 raise OSError(*args)
   1868             else:
   1869                 raise

OSError: [Errno 2] "dot" not found in path.

I can run the codes in terminal and pycharm successfully, but fail in jupyder notebook.我可以在终端和 pycharm 中成功运行代码,但在 jupyder notebook 中失败。 could you please help me?请你帮助我好吗? thanks!谢谢! Besides,I have installed dot successfully such as:此外,我已经成功安装了点,例如:

sudo apt-get insall graphviz
pip install pydot

brew install graphviz为我工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 OSError:[Errno&#39;jupyter-notebook&#39;not found] 2 - OSError: [Errno 'jupyter-notebook' not found] 2 ipython笔记本不起作用:OSError:[未找到Errno] 2 - ipython notebook doesn't work: OSError: [Errno None not found] 2 Jupyter笔记本-OSError [Errno 2]没有此类文件或目录 - Jupyter notebook - OSError [Errno 2] No such file or directory GAE - Flask - OSError:[Errno 13] 路径不可访问: - GAE - Flask - OSError: [Errno 13] path not accessible: Python:“ OSError:[Errno 2]没有这样的文件或目录:”…找到了它的文件? - Python: “OSError: [Errno 2] No such file or directory:”… with the file it found? Jupyter Notebook: OSError: “/bin/PHSshell” shell not found - Jupyter Notebook: OSError: "/bin/PHSshell" shell not found OSError: [Errno 22] 使用命令提示符打开 Jupyter Notebook 的参数无效 - OSError: [Errno 22] Invalid argument opening Jupyter Notebook with Command Prompt OSError:[Errno None not found] 2 - 在Windows上启动jupyter时出错 - OSError: [Errno None not found] 2 - error when launching jupyter on Windows OSError:[Errno 22]修改文件时,文件路径上的参数无效 - OSError: [Errno 22] Invalid argument on file path while modifying a file OSError: [Errno 2] 没有那个文件/目录 - OSError: [Errno 2] No such file/directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM