可视化配置pydot及graphviz

学习DeepLearning的时候使用keras并且进行可视化看看模型细节。

提示:Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.

安装了各种软件包还是报错,最后发现是环境变量问题。

1.pip3 install pydot
2.pip3 install pydot_ng
3.pip3 install graphviz
4.安装 graphviz-2.38.msi 

链接为:https://graphviz.gitlab.io/_pages/Download/Download_windows.html

5.设置环境变量:将graphviz-2.38安装的路径加进去

import os
os.environ["PATH"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin/'

然后测试一下:

import pydot_ng as pydot
print (pydot.find_graphviz())

 

你可能感兴趣的:(DeepLearning,keras可视化,pydot,graphviz)