Search code examples
python-3.xinstallationanacondakeraspydot

How to install pydot_ng and graphviz for Windows 64, Python 3.6?


I'm trying to install pydot_ng and graphviz through Anaconda Navigator but I keep getting this error for 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.

How do I proceed? I cannot use Keras visualization tools without pydot. I have installed pydot plus but Keras seems to reject it with this error in 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.

Solution

  • You are trying to install a Python 2.7 package in a Python 3.5 environment.

    Maybe this helps: How can I use conda to install pydot?