导入 theano:AttributeError:'module' 对象没有属性 'find_graphviz' [英] Importing theano: AttributeError: 'module' object has no attribute 'find_graphviz'
本文介绍了导入 theano:AttributeError:'module' 对象没有属性 'find_graphviz'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在 Python 中运行 import theano
时,我收到以下错误消息:
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 "help", "copyright", "credits" or "license" for more information.
>>> 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'
可能是什么问题,如何解决?
What could be the issue, and how to fix it?
我在 Ubuntu 14.04.4 LTS x64 和 Python 2.7.6 x64 上使用 Theano 0.8.2.
I use Theano 0.8.2 on Ubuntu 14.04.4 LTS x64 with Python 2.7.6 x64.
我尝试失败:
sudo apt-get install -y graphviz libgraphviz-dev
推荐答案
在 pydot
1.2.x 版本中,find_graphviz
函数已经已弃用.要解决此问题,您应该在此处安装 pydot 1.1.0 版本 https://github.com/erocarrera/pydot/树/v1.1.0 .这对我来说是工作.可能会有所帮助.
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.
这篇关于导入 theano:AttributeError:'module' 对象没有属性 'find_graphviz'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文