Jiacheng T.

asked • 02/09/21

GraphViz'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.

Olivier E.

What is the error message?
Report

02/11/21

Ahmed M.

may I see the error message because I tried this same code and it worked
Report

02/19/21

Mark W.

Maybe a problem with dependencies... or importing a module...
Report

11/24/24

Jeremy K.

In a terminal, type dot -V. If it returns a dot (version info), ensure the PATH variable is set. Otherwise, install dot.
Report

04/05/25

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.