为什么即使我安装了'pydot'和'graphviz',`tensorflow.keras.utils.plot_model()`也会失败?

时间:2020-11-08 11:48:42

标签: python tensorflow keras graphviz pydot

我正在关注documentation,并尝试使用tensorflow.keras.utils.plot_model()绘制MLP的体系结构。但是,它不断返回

('Failed to import pydot. You must `pip install pydot` and install graphviz (https://graphviz.gitlab.io/download/), ', 'for `pydotprint` to work.')

即使我特别检查并且pydotgraphviz都已列在已安装的软件包中。为什么会这样呢?我该怎么解决?

1 个答案:

答案 0 :(得分:0)

您还必须安装pydotplus。我安装了这些并解决了我的问题。

  1. pip install pydot
  2. pip install pydotplus
  3. pip install graphviz