python中使用graphviz画图

决策树类算法把图画出来比较直观,需要用到graphviz来画图,需要两个东西
1.graphviz软件
2.python调用graphviz的接口

conda installl graphviz 失败,会下很多包,同时downgrade部分包,最后报错
pip install graphviz 成功,但是会报错
ExecutableNotFound: failed to execute ['dot', '-Tsvg'], make sure the Graphviz executables are on your systems' PATH
要去官网下载graphviz这个工具,我直接下载的绿色版本,需要把bin路径加入到PATH中,加入后,必须重启生效

留言

熱門文章