I am trying to run graphviz to view dot file on jupyter notebook in have imported path to dot.exe path.
G:\anaconda3\envs\tensorflowgpu\Library\bin\graphviz G:\anaconda3\envs\tensorflowgpu\Library\bin\graphviz\dot.exe
I am trying to run this code:
with open("tree1.dot") as f:
dot_graph = f.read()
graphviz.Source(dot_graph)
OR
graphviz.Source("tree1.dot") .view()
It is giving:
failed to execute ['dot', '-Tsvg'], make sure the Graphviz executables are on your systems' PATH
Please tell me any way to fix this or any other way to View dot file on jupyter notebook i am running python 3.6 on jupter notebook
I have been having a similar issue (different execution - but both have the same errors in Jupyter) and was able to resolve it this way:
First I uninstalled the graphviz package I had originally installed via the Anaconda prompt.
conda remove graphviz
I found in this issue thread to use the below command to install the graphviz package. Appending graphviz with python- downloads the package in lib/site-packages
conda install python-graphviz
I restarted Jupyter Notebook in order to find dot.exe since I couldn't get it to find it in my running notebook after installing the package.
I hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With