• Register
0 votes

Problem :

I am getting following pydot error

importerror: failed to import pydot. you must install pydot and graphviz for `pydotprint` to work.

6 5 3
6,930 points

1 Answer

0 votes

Solution :

I also had faced the similar issue in the past.

I did bellow changes to resolve the issue.On mac Anaconda python=3.6.8

import keras
import pydotplus
from keras.utils.vis_utils import model_to_dot
keras.utils.vis_utils.pydot = pydot

plot_model(your_model_name, to_file='model.png')

That's worked for me.

Further Readings :

9 7 4
38,600 points

Related questions

0 votes
1 answer 13 views
I'm trying to visualize my model in keras using from keras.utils import plot_model plot_model (model, to_file = 'model.png') First of all it showed an error ImportError: Failed to import pydot. You need to install pydot and graphviz for `pydotprint` to work. Therefore, I ... Then I closed the spyder and reopened it. When I run the code snippet it still shows the same error. What am I missing?
asked Aug 17 game 4.3k points
0 votes
1 answer 35 views
Problem : I am trying to install theano with the help of following command: conda install theano on my Ubuntu 16.04. But facing following import problems. import theano Traceback (most recent call last): File"/home/milenko/miniconda3/lib/python3.6/configparser.py", ... : To use MKL 2018 with Theano you MUST set "MKL_THREADING_LAYER=GNU" in your environement. How to resolve this issue? Any clues?
asked Dec 2, 2019 alecxe 7.5k points
0 votes
1 answer 28 views
Problem: I have very recently downloaded the Graphviz 2.38 MSI version then installed it under folder C:\Python34. Next step I ran pip install Graphviz everything went well. In my system's path I have also added C:\Python34\bin. When I tried to run my ... I also tried to uninstall my Graphviz and did pip uninstall graphviz then tried reinstalling it and pip install again still nothing is working.
asked Aug 28 Raphael Pacheco 4.9k points
1 vote
1 answer 1.1K views
Problem : I am very new to deep learning using Keras-TensorFlow in the PyCharmCE environment I am facing below error while working : raise ImportError('Could not import PIL.Image. ' ImportError: Could not import PIL.Image. The use of array_to_img requires PIL.
asked Dec 28, 2019 alecxe 7.5k points
0 votes
2 answers 1.8K views
Problem : I am beginner to opencv and keras on python. Currently I am trying to apply the Keras' image classifier to my existing project, but I am facing below error. “Error: (-215:assertion failed) !ssize.empty() in function 'cv::resize'” Earlier with the same ... 8, 224x224, frames 3 My file type are exactly the same so now I am confused. Can somebody help me in fixing my problem ?
asked Feb 28 mphil 2.3k points