You must install pydot (`pip install pydot`) and install graphviz for plot_model to work

3.7k Views Asked by At
tf.keras.utils.plot_model(model, to_file='model.png', show_shapes=True, show_layer_names=True)

('You must install pydot (pip install pydot) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.') I have already installed the packages and still it is not working, I tried to uninstall and re-install but it didn't help.

import pydot
import pydotplus
import graphviz

strangely when I import the packages in the cell just above it works fine and gives no error, how can I solve this issue? TIA

1

There are 1 best solutions below

1
Rodolfo On

I had the same problem and my PC is Windows. So I downloaded Graphviz for windows on the GraphViz website AND downloaded it with PIP, then it worked