keras plot_model tells me to install pydot

后端 未结 3 1852
执念已碎
执念已碎 2020-12-11 17:49

I\'m using python 3.6.3 on a windows 10 machine. I installed pydot and graphviz using pip install via:

    py -m pip install pydot
    py -m pip install grap         


        
3条回答
  •  生来不讨喜
    2020-12-11 18:27

    Just to complete the @dataLeo 's solution, Python 3 users can use pydotplus package instead of pydot-ng package. To summarize:

    1. install pydot+graphviz and pydotplus by commands "conda install pydot" and "conda install -c conda-forge pydotplus".
    2. Go to the vis_utils.py file and change line 11 from import pydot to import pydotplus as pydot.

    PS: You can locate the vis_utils.py file by checking help for plot_model command in ipython console, i.e. after from keras.utils import plot_model, type ??plot_model in ipython console.

    Tested on Windows 10-64 bit with Anaconda python-3.6

提交回复
热议问题