pydot.InvocationException: GraphViz's executables not found

后端 未结 11 773
自闭症患者
自闭症患者 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:10
    brew install graphviz
    pip install -U pydotplus
    

    ... worked for me on MacOSX

    0 讨论(0)
  • 2021-02-07 04:10
    conda install -c anaconda graphviz        
    conda install -c anaconda pydot
    
    0 讨论(0)
  • 2021-02-07 04:22

    For windows users:
    1.install Graphviz
    2.Add Graphviz path to PATH variable
    3.Restart PyCharm or other compiler.

    As of version 2.31, the Visual Studio package no longer alters the PATH variable or accesses the registry at all. If you wish to use the command-line interface to Graphviz or are using some other program that calls a Graphviz program, you will need to set the PATH variable yourself.

    0 讨论(0)
  • 2021-02-07 04:22

    On mac, use Brew to install graphviz and not pip, see links:

    graphviz information: http://www.graphviz.org/download/

    brew installation: https://brew.sh/

    So typing the following in the terminal after you install brew should work:

    brew install graphviz
    
    0 讨论(0)
  • 2021-02-07 04:23

    Worked for me on Ubuntu 18.04 as well:

    $ sudo apt-get install graphviz  
    
    0 讨论(0)
提交回复
热议问题