Keras: “RuntimeError: Failed to import pydot.” after installing graphviz and pydot

后端 未结 12 1201
我在风中等你
我在风中等你 2020-12-03 04:58

I\'m using Anaconda Python 2.7 on windows 10

I was planning on doing Keras visualization so (whilst spyder was open) I opened the Anaconda command prompt and pip ins

12条回答
  •  心在旅途
    2020-12-03 05:18

    1. Install graphviz to the system. Download the package from here, or on Mac:

      brew install graphviz
      
    2. Install python pydot-ng and graphviz wrapper.

      pip install pydot-ng graphviz
      conda install -c anaconda pydot-ng #Anaconda user
      
    3. Use pydot-ng in your code

      import pydot_ng as pydot
      
    4. If Keras visualization utils still uses pydot, try to change import pydot to import pydot_ng as pydot in visualize_util.py

提交回复
热议问题