I have been trying unsuccessfuly to use graphviz inside a Jupyter Notebook with Python3 kernel installed via Anaconda3.
When I make a call to graphviz I get the error message:
InvocationException: GraphViz's executables not found
I begun by installing graphviz using conda. Since the exception persisted I installed again graphviz using pip.
There is a post that disccusses this problem in Stackoverflow here: Why is pydot unable to find GraphViz's executables in Windows 8?
I tried to follow the advice.
First I located the graphviz and added its path to the Environment path:
The path where graphviz is found in my PC is: C:\ProgramData\Anaconda3\Library\bin\graphviz
There is no bin directory inside this folder. The folder is flat without any subdirectories.
My system variables:
In the instructions provided in the aforementioned StackOverFlow post I am told:
now again head back to my computer and search for "pydotplus"
a folder named pydotplus is displayed. Open it and paste the copy of bin folder (of Graphviz) that you copied earlier
I have installed pydotplus:
However when I search for pydotplus I can not find it:
When I call again graphviz from inside my Jupyter Notebook I get again the same exception.
from IPython.display import Image
from sklearn import tree
import pydotplus
# Create DOT data
dot_data = tree.export_graphviz(dt_clf_4, out_file=None,
feature_names= features,
class_names= 'malignant')
# Draw graph
graph = pydotplus.graph_from_dot_data(dot_data)
# Show graph
Image(graph.create_png())
InvocationException: GraphViz's executables not found