Can't install graphviz by using "conda install python-graphviz" or "conda install graphviz"

Viewed 762

I tried install graphviz package using pip install graphviz, and I succesfully import it in jupyter notebook with python3, but failed to run the code below:

s = Source.from_file("tree_test.dot")
s.view()

The tree_test.dot file is under the current working directory. The error message is:

ExecutableNotFound: failed to execute ['dot', '-Kdot', '-Tpdf', '-O', 'tree_test.dot'], make sure the Graphviz executables are on your systems' PATH

I was advised to uninstall graphviz first using pip uninstall graphviz and then tried conda install graphviz and conda install python-graphviz, respectively. But both of them failed to install graphviz and here is the error message :

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: | 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
.....
#(spend long time examining conflict and shows what those conflicts are but still failed to install graphviz)#
1 Answers
Related