
Jiacheng T.
asked 02/09/21GraphViz's executables not found
I tried to run this code on mac,
from IPython.display import Image
dt_feature_names = list(X.columns)
dt_target_names = [str(s) for s in Y.unique()]
tree.export_graphviz(clf, out_file='tree.dot',
feature_names=dt_feature_names, class_names=dt_target_names,
filled=True)
graph = pydotplus.graph_from_dot_file('tree.dot')
Image(graph.create_png())
however, an error message keep popping up.
1 Expert Answer
Jeremy K. answered 04/05/25
Python Tutor | Software Engineer with 5 Yrs of Real-World Coding
In a terminal, type dot -V. If it returns a dot (version info), set the PATH variable. Otherwise, install dot.
Still looking for help? Get the right answer, fast.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Olivier E.
What is the error message?02/11/21