python - 调用异常 : GraphViz's executables not found (Python)

标签 python graphviz

在下面的代码中调用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

最佳答案

pydotplus在其要求中指出,您需要 GraphViz安装在您的系统中。

关于python - 调用异常 : GraphViz's executables not found (Python),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44351889/

相关文章:

label - 如何防止边缘标签弄乱graphviz中的布局?

textmate - TextMate 有 DOT 包吗?

Graphviz 点算法

python - 为了适应大规模数据存储和检索,我应该做什么?

python - sklearn 上的逻辑回归函数

python - 为什么 DuplicateKeyError : E11000 duplicate key error index: test. test.$notification_1 dup key: { : null }

php - Graphviz 关注一个节点

python-2.7 - Pydot/Graphviz : How to order horizontally nodes in a Cluster while the rest of the graph is vertical

python - 将逗号小数分隔符转换为数据框中的点

python - 对嵌套元组列表进行排序