• Register
0 votes
2.1k views

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

Please log in or register to answer this question.

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 33 views
33 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, 2020 game 4.6k points
0 votes
1 answer 53 views
53 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 84 views
84 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, 2020 Raphael Pacheco 4.9k points
1 vote
1 answer 1.3K views
1.3K 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 2.5K views
2.5K 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, 2020 mphil 2.3k points
0 votes
1 answer 109 views
109 views
Problem : I am very new to tensorflow-gpu, I want to use the tensorflow-gpu on my system. I have already tried to reinstall tensorflow-gpu many times but still it shows me the following error.If I use the tensorflow-cpu then it works correctly. Please Note: I ... ) ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory Can somebody help me in fixing above error ?
asked Feb 19, 2020 mphil 2.3k points
0 votes
2 answers 85 views
85 views
Problem : I have recently installed the cuda 8.0 and cuda 9.0 in the Gpu support system. I encountered the below error while importing from the keras module. It says it is unable to load the native tensorflow runtime. I have received the error log as below: Traceback ... is, Cuda compilation tools, release 8.0, V8.0.61 Is it the clash between two cuda versions? Have anyone solved this before?
asked Feb 18, 2020 mphil 2.3k points
0 votes
1 answer 385 views
385 views
Problem: If I try to execute the command sess = tf.Session() in the Tensorflow 2.0 environment then I am facing below error message: Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'tensorflow' has no attribute ' ... install numpy==1.16.2 Command Execution as below: Execute the command: import tensorflow as tf Execute the command: sess = tf.Session()
asked Jul 21, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 53 views
53 views
Problem: I am very new to Keras. Now a days I am trying to use Keras (Sequential) but I am facing below error if I try to import it: File "kaggle_titanic_keras.py", line 3, in <module>     from keras.models import Sequential  File "/anaconda/lib/python2.7/site- ... 2.0.3 and recently 'upgraded' to Pandas 0.20.1 which I doubt is causing a problem but above error message says nothing about it.
asked Jul 21, 2020 Raphael Pacheco 4.9k points
1 vote
1 answer 481 views
481 views
Problem: I am having basic knowledge of python, tensorflow, keras. I have read most of the possible solutions for my error they are suggesting wrapping my problematic tensor in the Lambda layer and I have already tried this method but I ... line 1665, in build_map_of_graph     layer, node_index, tensor_index = tensor._keras_history AttributeError: 'Tensor' object has no attribute '_keras_history'
asked May 23, 2020 Martin K 6.6k points