我想用caffe.draw
在mac上用anaconda python绘制咖啡网。但我得到的错误如下:
File "python/draw_net.py", line 45, in <module>
main()
File "python/draw_net.py", line 41, in main
caffe.draw.draw_net_to_file(net, args.output_image_file, args.rankdir)
File "/Users/xxh/caffe/distribute/python/caffe/draw.py", line 222, in draw_net_to_file
fid.write(draw_net(caffe_net, rankdir, ext))
File "/Users/xxh/caffe/distribute/python/caffe/draw.py", line 204, in draw_net
return get_pydot_graph(caffe_net, rankdir).create(format=ext)
File "/Users/xxh/anaconda2/lib/python2.7/site-packages/pydot.py", line 1883, in create
prog=prog))
Exception: "dot" not found in path.
我已经安装了pydot和graphviz,如何将点的路径添加到python path中?
发布于 2017-04-27 01:37:04
对于我来说:
brew install gprof2dot
已修复此问题。
发布于 2017-07-28 14:45:23
如果你仍然收到这个错误,我想你是用pip安装了pydot和graphviz。
请使用:
sudo apt-get install graphviz
pip install pydot
如果这给您带来了权限问题,请使用:
sudo pip install pydot
这将从Ubuntu安装完整的graphviz。
在此之后,draw_net.py
将正常运行。
发布于 2019-06-03 06:29:25
在Mac运行中:
pip install pydot
brew install gprof2dot
https://stackoverflow.com/questions/40243753
复制相似问题