Can't Display Graphviz Tree In Jupyter Notebook
I'm trying to display a decision tree in Jupyter Notebook and I keep receiving the message: CalledProcessError: Command '['dot.bat', '-Tsvg']' returned non-zero exit status 1 I'm
Solution 1:
Installing graphviz xorg-libxrender xorg-libxpm from conda-forge repo, and the python bindings from pip usually solves this for me.
conda install -c conda-forge graphviz xorg-libxrender xorg-libxpm
pip install graphviz
Do not forget to uninstall the previously installed packages first.
Solution 2:
Paul-Armand's answer should work if you are working with conda. If not then you have to run :
brew install graphviz
pip install graphviz
In case you get a warning saying that graphviz is already installed but not linked then follow the instruction to link it. I.e brew link graphviz
(or brew link --overwrite graphviz
if the former gives an error).
The reason it works in conda without brew is that conda install graphviz
actually installs the c++ library not the python one.
Post a Comment for "Can't Display Graphviz Tree In Jupyter Notebook"