【问题标题】:InvocationException: GraphViz's executables not found (Python)InvocationException:未找到 GraphViz 的可执行文件 (Python)
【发布时间】:2017-11-05 05:17:22
【问题描述】:

在下面的代码中调用pydotplus.graph_from_dot_data 时出错:

from IPython.display import Image  

dot_data = tree.export_graphviz(clf,
                                out_file=None,
                                feature_names=iris.feature_names,
                                class_names=iris.target_names,
                                filled=True,
                                rounded=True,
                                special_characters=True)  
graph = pydotplus.graph_from_dot_data(dot_data)  
Image(graph.create_png())

错误输出:

File "C:\Users\ss\Anaconda3\lib\site-packages\pydotplus\graphviz.py", line 1960, in create 'GraphViz\'s executables not found')
InvocationException: GraphViz's executables not found

【问题讨论】:

标签: python graphviz


【解决方案1】:

正如pydotplus 在其要求中所述,您需要在系统中安装GraphViz

【讨论】:

    猜你喜欢
    • 2017-09-18
    • 2018-08-31
    • 2015-04-03
    • 2016-12-18
    • 2018-07-29
    • 2023-03-06
    • 1970-01-01
    • 2015-02-24
    • 2021-03-22
    相关资源
    最近更新 更多