起序:OSError: pydot
failed to call GraphViz.Please install GraphViz (https://www.graphviz.org/) and ensure that its executables are in the $PATH.
一、问题
使用
keras
自带的绘图工具plot_model
绘制模型网络结构
时
显示 OSError:
pydot
failed to call GraphViz…
OSError: `pydot` failed to call GraphViz.Please install GraphViz (https://www.graphviz.org/) and ensure that its executables are in the $PATH.
二、解决
1、在 虚拟环境
中安装 pydot-ng
graphviz
pydot
pip install pydot-ng graphviz pydot
3、配置 graphviz
的环境变量
可以在
用户变量(U)
或者系统变量(S)
的path
配置,确定即可
三、重启
注:不是重启电脑
- 如果是
编译器
:重启即可 - 如果是
jupyter
:重启即可
如果对您有帮助,点个赞再走吧。