1. 程式人生 > >RuntimeError: failed to execute ['dot', '-Tpdf', '-O', 'test'], make sure the Graphviz executables

RuntimeError: failed to execute ['dot', '-Tpdf', '-O', 'test'], make sure the Graphviz executables

在python中想用graphviz畫圖的時候,發現報瞭如下異常:

RuntimeError: failed to execute ['dot', '-Tpdf', '-O', 'test'], make sure the Graphviz executables are on your systems' path

很奇怪啊。python裡面明明已經安裝好了graphviz。。。
經過google搜尋,發現是系統也需要安裝graphviz。。。

sudo apt-get install graphviz

系統安裝graphviz完畢以後,程式碼就可以正常執行。