ubuntu16.04安装pydot和graphviz的问题

在keras可视化计算图时,需要提前安装pydot和graghviz,但pip install pydot graghviz后却还是报如下错误:

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

解决方法:

sudo apt install python-pydot python-pydot-ng graphviz 
# python-pydot-ng isn't in the 14.04 repos`

16.04版本需要多install一个python-pydot-ng,同时我使用的py3,应使用pip3或者apt安装,不能用pip

猜你喜欢

转载自blog.csdn.net/mjl960108/article/details/79981794
今日推荐