When I run import theano
in Python, I get the following error message:
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type
For some reason, the Python module pydot
was creating the issue:
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import pydot
>>> pydot.find_graphviz()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'find_graphviz'
I was using pydot 1.2.2.
I uninstalled it using sudo pip uninstall -y pydot
, and I then was able to successfully import theano
.
Bug report: https://github.com/Theano/Theano/issues/4759
I solved by installing pydot-ng --> $ pip install pydot-ng
In pydot
1.2.x version,find_graphviz
function have been deprecated. To fix this issue, you should install pydot 1.1.0 version here https://github.com/erocarrera/pydot/tree/v1.1.0 . And it is work for me. May help.
I solved it by using
sudo pip install graphviz
sudo apt-get install graphviz
with the pydot version 1.2.3 works fine