美文网首页
keras.utils.plot_model报错

keras.utils.plot_model报错

作者: dingtom | 来源:发表于2020-06-19 11:38 被阅读0次

OSError: pydot failed to call GraphViz.Please install GraphViz (https://www.graphviz.org/) and ensure that its executables are in the $PATH.

Failed to import pydot. You must install pydot and graphviz

win10

1.安装 GraphViz

下载msi文件安装

与python关联
pip install graphviz

2.添加环境变量

用户变量Path添加:

C:\programfile\graphviz\bin(这个为你安装的graphviz路径下的bin路径)

系统变量Path添加:

C:\programfile\graphviz\bin\dot.exe

命令行输入

dot -version查看路径是否为安装目录

3.安装pydot

pip install pydot
pip install pydot_ng

修改py文件
找到E:\anaconda3\envs\tensorflow\Lib\site-packages\pydot.py
修改return '.bat' if is_anacoda() else '.exe'
return '.bat' if not is_anacoda() else '.exe'

相关文章

网友评论

      本文标题:keras.utils.plot_model报错

      本文链接:https://www.haomeiwen.com/subject/vmrvxktx.html