我尝试使用pip install graphviz
安装graphviz
包,并使用python3成功地将其导入到jupyter notebook中,但无法运行以下代码:
s = Source.from_file("tree_test.dot")
s.view()
tree_test.dot
文件位于当前工作目录下。错误消息为:
ExecutableNotFound: failed to execute ['dot', '-Kdot', '-Tpdf', '-O', 'tree_test.dot'], make sure the Graphviz executables are on your systems' PATH
有人建议我先使用pip uninstall graphviz
卸载graphviz
,然后分别尝试conda install graphviz
和conda install python-graphviz
。但这两个系统都无法安装graphviz
,下面是错误消息:
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)#
发布于 2021-06-07 11:13:17
根据Anaconda's package documentation,你需要输入:
conda install -c anaconda graphviz
https://stackoverflow.com/questions/67865124
复制相似问题