Python Runtimeerror: Failed To Import Pydot
Solution 1:
I got the same error and I did the following sequence to make it work, in a Python 3:
source activate anaconda
pip install pydot
pip install pydotplus
pip install pydot-ng
Then you download and install Graphviz from here according to your OS type: http://www.graphviz.org/Download..php
If you are running Python on Anaconda, open Spyder from terminal, not from Anaconda. Go to terminal and type:
spyder
Then:
import theano
import theano.tensoras T
.
.
.
import pydot
import graphviz
import pydot_ng as pydot
Develop your model and:
theano.printing.pydotprint(prediction, outfile="/Volumes/Python/prediction.png", var_with_name_simple=True)
Solution 2:
It mainly depends on where you put the pydot files. If you are running it straight from the Python Shell then you should have them installed in the modules folder which is most commonly the "Lib" folder inside the main python folder.
Solution 3:
I also have the same issue. I would suggest you post this in the Github Theano Issues forum:
https://github.com/Theano/Theano/issues?direction=desc&sort=updated&state=open
It seems to me, that since this instance of the pydotprint() function is actually part of the printing module within the Theano library that this should not be an issue (but it is) and hence it should be brought to the attention of the developers in order to fix it.
Please correct me if this is not the case.
Post a Comment for "Python Runtimeerror: Failed To Import Pydot"