Graphviz

Hi everyone. is there any one know to use graphiz. I m learning machine learnig and created a classification decisiın tree. When i want to visualize the classification tree using the graphiz:



from sklearn import tree

import graphviz

dot_data=tree.export_graphviz(clf,out_file=None,filled=True,feature_names_list)

graphviz.Source(dot_data)



it thorws error:

No module named 'graphviz'



should i download graphviz from web ? 

Yes, you can download the Graphviz from the web and add to the path so that the decision tree can be visualized.



The detailed instructions can be found in the below link:

https://inteligencia-analitica.com/wp-content/community/uploads/2017/08/Installing-Graphviz-and-pydotplus.pdf



Thanks!

Thank for your respond. I followed all the instructions but it gives me a new error :

   raise ExecutableNotFound(cmd)



ExecutableNotFound: failed to execute ['dot', '-Tsvg'], make sure the Graphviz executables are on your systems' PATH



Out[3]: <graphviz.files.Source at 0x1a2b2fca90>



after that I tried to set it up again but I got that :'

Requirement already satisfied'

do you have any idea whats the new step ?
and I use mac is that a problem ? 
thanks again
 

It looks like "brew install graphviz" or "conda install graphviz" from terminal should solve this problem for MacOs.

Source: https://stackoverflow.com/questions/35064304/runtimeerror-make-sure-the-graphviz-executables-are-on-your-systems-path-aft

Thank you!

thats so useful thanks so much