InvocationException: No GraphViz binaries found

I am unable to visualize or write a decision tree. How can i do this?

Python version 3.5, Anaconda 3, I even set environment variables

    from sklearn import tree
    model = tree.DecisionTreeClassifier(criterion='gini') 
    model=tree.DecisionTreeClassifier()
    model.fit(trainData,trainLabel)
    model.score(trainData,trainLabel)
    predicted= model.predict(testData)

    from sklearn.externals.six import StringIO
    import pydot 
    import pydotplus
    dot_data = StringIO() 
    tree.export_graphviz(model, out_file=dot_data) 
    graph = pydotplus.graph_from_dot_data(dot_data.getvalue()) 
    print(graph)
    graph.write_pdf("C:\\Users\\anagha\\Desktop\\SynehackData\\DATA\\DATA\\graph.pdf") 

      

mistake:

InvocationException: GraphViz executables not found

      

+3
python python-3.x decision-tree pygraphviz


source to share


No one has answered this question yet

Check out similar questions:

804
How do I get the execution time of a Python program?
758
pip install mysql-python doesn't work with EnvironmentError: mysql_config not found
614
pg_config executable file not found
64
Why can't pydot find the GraphViz executables on Windows 8?
15
pydot.InvocationException: No GraphViz binaries found
0
Pi-tables vs Blaze vs S-Frames
0
Could not find the Graphviz executable
0
Could not find the GraphViz executables: Anaconda-3
0
Function values, discretization and criterion in decision trees



All Articles
Loading...
X
Show
Funny
Dev
Pics