[Py] Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work

通过llama.cpp与羊驼聊天的网页界面- 详解 Serge 的启动使用

 

当通过常规命令安装 pip install pydot 和 brew install graphviz 之后,在代码中 import pydot 依旧不生效。

比如:在 tensorflow 使用 tf.keras.utils.plot_model 的时候,就会提示 Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work

 

这时候,你需要安装新版本 pydot-ng,然后 import pydot_ng as pydot。

如果是在 juypter 中使用,重启一下 jupyter。

 

Refer:Python包导入错误

Refer:https://pypi.org/project/pydot-ng/

Link:https://www.cnblogs.com/farwish/p/13230246.html

posted on 2020-07-03 14:34  ercom  阅读(767)  评论(0编辑  收藏  举报