【问题标题】:can not import pydot even after installing it即使安装后也无法导入pydot
【发布时间】:2018-04-15 02:28:36
【问题描述】:

当我尝试安装 pydot 时,它说我已经安装了它。

但是每当我尝试导入它时,我都会收到一条错误消息: 导入 pydot 失败。您必须安装 pydot 和 graphviz 才能使 pydotprint 工作。

这是我的代码:

model.summary()
import pydot
from keras.utils import plot_model
plot_model(model, to_file='model.png')

我在 jupyter notebook 上使用 python 3.6.3。

【问题讨论】:

  • 你是如何运行代码的? python -c import sys; print(sys.path) 的输出是什么?

标签: python python-3.x anaconda jupyter-notebook pydot


【解决方案1】:

从>http://www.graphviz.org/Download_windows.php下载msi版本的graphviz

将 C:\Program Files (x86)\Graphviz2.38\bin 添加到我在 PATH 中的系统变量中

【讨论】:

    猜你喜欢
    • 2019-08-20
    • 2020-06-21
    • 2016-11-26
    • 2020-09-10
    • 1970-01-01
    • 1970-01-01
    • 2018-07-21
    • 2022-01-13
    • 2018-07-22
    相关资源
    最近更新 更多