问题:当出现错误

graphviz.backend.execute.ExecutableNotFound: failed to execute WindowsPath('dot'), make sure the Graphviz executables are on your systems' PATH

解决方案:

graphviz是个软件,不能单独用pip安装

1.下载graphviz的安装包 ,网址: https://graphviz.org/download/

 

下载之后,点击下载成功的.exe文件进行安装,,安装的时候记住安装路径,如Anaconda\Graphziv,后续配置环境变量的时候要使用

在安装过程中,一定要注意:将之加入到环境变量中去

2.如果没有加入请参考此步骤进行添加环境变量

<1.此电脑右键----->属性----->高级系统设置----->环境变量----->xxx的用户变量u----->path----->新建

(此条当安装时选择了加入环境变量则不需要再加)

粘贴文件的安装路径+\bin :例如E:\Programming\python库\Graphviz\bin

<2. 此电脑右键----->属性----->高级系统设置----->环境变量----->系统环境变量(s)----->path----->新建
粘贴文件的安装路径+\bin\dot.exe :例如D:\python\graphviz\bin\dot.exe

 

3.进行pip包graphviz

4.重启pycharm后运行我的py代码