【问题标题】:How to install pydot_ng and graphviz for Windows 64, Python 3.6?如何为 Windows 64、Python 3.6 安装 pydot_ng 和 graphviz?
【发布时间】:2017-12-08 17:00:20
【问题描述】:

我正在尝试通过 Anaconda Navigator 安装 pydot_ng 和 graphviz,但我不断收到 pydot_ng (1.0.0.15) 的此错误:

UnsatisfiableError: The following specifications were found to be in conflict:
  - pydot-ng -> python 2.7*
  - python 3.6*
Use "conda info <package>" to see the dependencies for each package.

我该如何进行? 没有 pydot,我无法使用 Keras 可视化工具。 我已经安装了 pydot plus,但 Keras 似乎在 iPython notebook 中以这个错误拒绝它。

  File "C:\ProgramData\Anaconda3\lib\site-packages\keras\utils\vis_utils.py", line 131, in plot_model
    dot = model_to_dot(model, show_shapes, show_layer_names, rankdir)

  File "C:\ProgramData\Anaconda3\lib\site-packages\keras\utils\vis_utils.py", line 52, in model_to_dot
    _check_pydot()

  File "C:\ProgramData\Anaconda3\lib\site-packages\keras\utils\vis_utils.py", line 27, in _check_pydot
    raise ImportError('Failed to import pydot. You must install pydot'

ImportError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.

【问题讨论】:

    标签: python-3.x installation anaconda keras pydot


    【解决方案1】:

    您正在尝试在 Python 3.5 环境中安装 Python 2.7 包。

    也许这会有所帮助: How can I use conda to install pydot?

    【讨论】:

      【解决方案2】:

      为 Python 3.5 + 环境安装 pydotplus(而不是 pydot)。

      sudo conda install pydotplus

      sudo conda install graphviz

      确保在代码中导入“pydotplus”(而不是 pydot)。

      【讨论】:

        猜你喜欢
        • 2018-10-23
        • 2017-12-19
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-07-18
        相关资源
        最近更新 更多