导入theano:AttributeError:'模块'对象没有属性'find_graphviz'

发布于 2021-01-29 15:15:35

当我import theano在Python中运行时,出现以下错误消息:

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'

可能是什么问题,以及如何解决?

我在Python 2.7.6 x64的Ubuntu 14.04.4 LTS x64上使用Theano 0.8.2。


我尝试失败:

  • sudo apt-get install -y graphviz libgraphviz-dev
关注者
0
被浏览
49
1 个回答
  • 面试哥
    面试哥 2021-01-29
    为面试而生,有面试问题,就找面试哥。

    pydot1.2.x版本中,find_graphviz功能已弃用。要解决此问题,您应该在此处https://github.com/erocarrera/pydot/tree/v1.1.0安装pydot
    1.1.0版本。对我来说这是工作。可能有帮助。



知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看