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
与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'