关于Failed to import pydot. You must install pydot and graphviz for pydotprint
to work的解决办法
1.安装graphviz:
首先要在python中安装graphviz:pip install graphviz;
2.安装pydot
pip install pydot
3.如果用的是python3以上的版本:pydot已经停止开发了,python3.5和python3.6已经用不起来。
对策是:
pip uninstall pydot
pip install pydotplus
然后找到keras里面的utils\vis_utils.py,把里面的pydot的都替换成pydotplus。
4.分别sudo pip install之后还是会报错 Failed to import pydot. You must install pydot and graphviz for pydotprint
to work,可以通过 sudo apt-get install graphviz 解决.
我的这个问题就解决了,不说了,我去解决其他问题了…