Importing theano: AttributeError: 'module' object has no attribute 'find_graphviz'
问题:
>>> import theano
Traceback (most recent call last):File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/theano/__init__.py", line 74, in <module>
from theano.printing import pprint, pp
File "/usr/local/lib/python2.7/dist-packages/theano/printing.py", line 35, in <module>
if pd.find_graphviz():
AttributeError: 'module' object has no attribute 'find_graphviz'
原因:
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.
解决方案:
sudo pip uninstall -y pydot
或者
pip install pydot-ng