Not able to use fastbook draw_tree function

I am working on chapter 9 of the fastbook and while trying to visualize the decision tree, and this is the error that I am getting. I have installed fastbook and graphviz and added it to the environment variable path.

failed to execute Path(‘dot’), make sure the Graphviz executables are on your systems’ PATH

Can anyone please help me with this?

The draw_tree, if I remember correctly, is part of the dtreeviz library.

I think the draw_tree function no longer exists in the latest version of the library, so take a look at the examples in the readme to see how to use it.

you can install and use it in this way

!pip install fastbook

from fastbook import draw_tree