美文网首页
keras plot_model报错:'`pydot` fail

keras plot_model报错:'`pydot` fail

作者: 都灵的夏天_ | 来源:发表于2021-09-09 16:37 被阅读0次

问题

环境:ubuntu20
keras ==2.3.1
报错位置:plot_model()

  1. 提示没有安装pydot
pip install pydot

2.再次报错
pydot failed to call GraphViz

然后百度查阅资料
得到结果 pydot的问题,pydot已经停止开发了,不支持python3.5以上

解决方法

1。卸载pydot 安装pydotplus

pip unistall pydot
pip install pydotplus
  1. 然后找到keras.utils源文件

tips: pychram按住ctrl 点击即可

  1. 进入init文件再进入plot_model包(方法同上)


  2. 替换”pydot“为”pydotplus“
    pycharm 按住ctrl+r 即可如图


  3. 安装Graphpy

conda install graphviz
#在你的虚拟环境中安装

完美解决!

相关文章

网友评论

      本文标题:keras plot_model报错:'`pydot` fail

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