在windows10中用Anaconda3安装graphviz并通过Jupyter笔记本/Python3使用它

2024-04-23 09:38:27 发布

您现在位置:Python中文网/ 问答频道 /正文

我一直试图在一个Jupyter笔记本中使用graphviz,但是没有成功,它通过Anaconda3安装了Python3内核。在

当我打电话给graphviz时,我收到错误消息:

InvocationException: GraphViz's executables not found

我开始用conda安装graphviz。由于异常持续存在,我使用pip再次安装了graphviz。在

Stackoverflow中有一篇文章讨论了这个问题:Why is pydot unable to find GraphViz's executables in Windows 8?

我试着听从劝告。在

首先,我找到了graphviz并将其路径添加到环境路径:

enter image description here

graphviz在我的电脑中的路径是:C:\ProgramData\Anaconda3\Library\bin\graphviz

此文件夹中没有bin目录。文件夹是平面的,没有任何子目录。在

我的系统变量:

enter image description here

在上述StackOverFlow帖子中提供的说明中,我被告知:

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

我已经安装了pydotplus:

enter image description here

但是当我搜索pydotplus时却找不到它:

enter image description here

当我从我的Jupyter笔记本里再次调用graphviz时,我又遇到了同样的异常。在

^{pr2}$

Tags: andto路径文件夹binis笔记本jupyter
1条回答
网友
1楼 · 发布于 2024-04-23 09:38:27

我没有使用pydot,但它似乎使用了与graphviz相同的可执行文件。为了我, 使用conda install python-graphviz安装graphviz修复了缺少的graphviz可执行文件问题。在

相关问题 更多 >