pydot.InvocationException: GraphViz's executables not found

后端 未结 11 755
自闭症患者
自闭症患者 2021-02-07 03:22

I try to run this example for decision tree learning, but get the following error message:

File \"coco.py\", line 18, in graph.write_pdf(\"iris.pdf

11条回答
  •  深忆病人
    2021-02-07 04:04

    cel, answered this in the comment:

    Graphviz is not a python tool. The python packages at pypi provide a convenient way of using Graphviz in python code. You still have to install the Graphviz executables, which are not pythonic, thus not shipped with these packages. You can install those e.g. with a general-purpose package manager such as homebrew

    For me personally, on ubuntu 14.04, all I had to do is:

    sudo apt-get install graphviz
    

提交回复
热议问题