how to install pydot & graphviz on google colab?

ⅰ亾dé卋堺 提交于 2019-12-01 00:36:31

问题


I'm trying plot my model on the google colab.

 from keras.utils import plot_model
 plot_model(model, to_file="model.png")

and I got this error:

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

I've installed pydot-ng and graphviz and I'm still can't get through this error.


回答1:


To install pydot, run:

!pip install -q pydot

Then, restart your VM to reload keras which should then detect pydot's existence. (Runtime menu -> Restart runtime...)



来源:https://stackoverflow.com/questions/49853303/how-to-install-pydot-graphviz-on-google-colab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!