keras plot_model 告诉我安装 pydot [英] keras plot_model tells me to install pydot

查看:21
本文介绍了keras plot_model 告诉我安装 pydot的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows 10 机器上使用 python 3.6.3.我通过以下方式使用 pip install 安装了 pydot 和 graphviz:

I'm using python 3.6.3 on a windows 10 machine. I installed pydot and graphviz using pip install via:

    py -m pip install pydot
    py -m pip install graphviz

我也去了graphviz网站,在这里下载并安装了windows版本:http://www.graphviz.org/Download_windows.php 默认安装到程序文件(x86).但是当我在 keras 中绘制我的模型时,我仍然收到错误消息,说我必须安装 pydot 和 graphviz 并且导入失败.我可以

I also went to the graphviz website and downloaded and installed the windows version here: http://www.graphviz.org/Download_windows.php which default installed to program files(x86). But when I go to plot my model in keras, I still get the error saying I have to install pydot and graphviz and that the import failed. I can do

    import pydot
    import graphviz

在我的 python 控制台上很好,它们没有抛出任何错误.我还应该做什么才能绘制我的神经网络图?

on my python console just fine, they throw no errors. What else should I do to be able to graph my neural net?

推荐答案

安装的 GraphViz 可执行文件(dotneato 等)的路径需要位于 PATH 环境变量中,以便pydot 找到它们.pydot 用于搜索早期版本中的那些可执行文件,但 不再是.

The path(s) to the installed GraphViz executables (dot, neato, etc.) need to be in the PATH environment variable, in order for pydot to find them. pydot used to search for those executables in earlier versions, but not any more.

还有:

  1. pydot 是一个 Python 包.
  2. GraphViz 是一组工具 用 C 编写 用于计算图形布局
  3. graphviz 是一个与 pydot<完全无关的 Python 包/代码>.这两个 Python 包不会以任何方式相互交互.安装其中之一就足够了(连同 GraphViz).
  1. pydot is a Python package.
  2. GraphViz is a collection of tools written in C for computing graph layouts
  3. graphviz is a Python package entirely unrelated to pydot. These two Python packages do not interact in any way with each other. Installing one of them should suffice (together with GraphViz).

另见:

和那里的链接.

这篇关于keras plot_model 告诉我安装 pydot的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆