GraphViz‘s executables not found报错解决方案

引用:https://blog.****.net/weixin_36407399/article/details/87890230

通过pip安装graphviz模块后,进行sklearn的决策树文档操作输出决策树模型结果时报错,报错内容为:GraphViz’s executables not found。

通过了解得知:graphviz是属于一个独立的软件,需要到官网下载安装包解压,将bin的路径添加到环境变量。

下载网址链接:https://graphviz.gitlab.io/_pages/Download/Download_windows.html

添加环境变量方法:

1、定位到高级系统设置:

GraphViz‘s executables not found报错解决方案

2、定位‘环境变量’

GraphViz‘s executables not found报错解决方案

3、点击‘新建’,将bin的路径复制进去

GraphViz‘s executables not found报错解决方案

将路径添加到环境变量后还是报错,于是在代码块运行以下语句,不在报错:

GraphViz‘s executables not found报错解决方案

4、进行到这步,出现pdf格式无法识别

在pycharm的Terminal中运行 'dot -c'