【问题标题】:pydot has no attribute 'find graphviz'pydot 没有属性'find graphviz'
【发布时间】:2017-07-25 18:06:38
【问题描述】:

我在 Windows 65 位机器上运行 Anaconda,python 3.5。我已经成功运行
conda install -c anaconda graphviz 以及 pydot。

导入theano、pydot、numpy,并实例化theano函数f后,当我尝试运行时

theano.printing.pydotprint(f, outfile='f.png',var_with_name_simple=True)

我得到了 AttributeError:

文件“C:\Users\Me\Anaconda3\lib\site-packages\theano\printing.py”,第 35 行,在 如果 pd.find_graphviz():

AttributeError: 模块 'pydot' 没有属性 'find_graphviz'

怎么了?我运行的是坏版本的 pydot 吗?

--肯

【问题讨论】:

  • 嗯,65 位的机器很少见,我认为 theano 不支持它:)

标签: python theano pydot


【解决方案1】:

来自 github https://github.com/fchollet/keras/issues/3210 上的相关问题: 尝试安装pydot-ng 而不是pydot

【讨论】:

    【解决方案2】:

    函数find_graphviz 已在pydot == 1.2.3 中删除。请参阅this pydot issue 了解更多详情。相反,pydot 在当前环境的 PATH 变量中搜索 GraphViz 可执行文件。

    【讨论】:

      【解决方案3】:

      您究竟是如何安装 pydot 的? 据我所知,pydot 的 pip install 仅支持 python 2.7 版本。

      对于 python 3+,您可以在Conda Cloud 尝试其他版本的 pydot。我用的是pydotplus:

      conda install -c conda-forge pydotplus 
      

      【讨论】:

        猜你喜欢
        • 2018-06-20
        • 2020-05-23
        • 2017-12-12
        • 2016-05-19
        • 2014-06-05
        • 2018-12-13
        • 2018-02-05
        • 2021-01-05
        • 1970-01-01
        相关资源
        最近更新 更多