0

I have been searching for hours for the answer to this problem and have now pieced it together, so am posting it here with the solution.

I am trying to use keras.utils.plot_model(model) to visualise my model while stepping through my code in the Pycharm debugger. It fails with:

ImportError: ('You must install pydot (pip install pydot) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')

Installing the two packages using the Pycharm Preferences->Project->Python Interpreter panel, allows them to be imported and used in the code, but the same error occurs on run.

Julian7
  • 191
  • 1
  • 12

1 Answers1

0

After I installed pydotplus and Graphviz in the python virtual environment in the Mac Terminal, it worked:

source venv/bin/activate
pip install pydotplus
brew install graphviz
Julian7
  • 191
  • 1
  • 12