安裝上graphviz和pydot以後調用出現以下問題python
['dot', '-Tpng', '/tmp/tmp1KPaiV'] return code: 1 stdout, stderr: Warning: Could not load "/home/liu/anaconda2/envs/tensorflow/lib/graphviz/libgvplugin_pango.so.6" - file not found Warning: Could not load "/home/liu/anaconda2/envs/tensorflow/lib/graphviz/libgvplugin_pango.so.6" - file not found Format: "png" not recognized. Use one of: canon cmap cmapx cmapx_np dot eps fig gv imap imap_np ismap pdf pic plain plain-ext png pov ps ps2 svg svgz tk vml vmlz xdot xdot1.2 xdot1.4
其實這裏是存在一些依賴關係的,首先咱們須要安裝graphviz的python接口,而後安裝graphviz軟件自己,最後安裝pydot
在Ubuntu下即:svg
pip install graphviz sudo apt-get install graphviz pip install pydot