failed to execute [‘dot‘, ‘-Tpdf‘, ‘-O‘, ‘pengunis‘], make sure the Graphviz executables are on your

*问题:已经在jupyter notebook中使用pip install graphviz,import graphviz 之后无法使用,显示failed to execute ['dot', '-Tpdf', '-O', 'pengunis'], make sure the Graphviz executables are on your systems' PATH
*

原因:graphviz需要在系统中配置环境变量

  1. 进入官网http://www.graphviz.org/download/根据不同系统下载软件

windows10对应的软件我已经下载好了,原网址下载较慢,着急的朋友直接在公众号【小洲三流road】后台回复【graphviz】即可获得安装包

  1. 我这里以Windows为例
    failed to execute [‘dot‘, ‘-Tpdf‘, ‘-O‘, ‘pengunis‘], make sure the Graphviz executables are on your
  2. 下载完毕,配置环境变量
    我的电脑–【右击】属性–高级系统设置
    failed to execute [‘dot‘, ‘-Tpdf‘, ‘-O‘, ‘pengunis‘], make sure the Graphviz executables are on your

4. 新建路径,命名并找到刚刚下载的位置的子文件夹bin(注意这一步是个坑)

failed to execute [‘dot‘, ‘-Tpdf‘, ‘-O‘, ‘pengunis‘], make sure the Graphviz executables are on your
4. 正确的应该是在找到原有的path路径➡编辑➡添加 此路径C:\Program Files (x86)\Graphviz2.38\bin(如果你下载在别的地方,则选择其他路径)failed to execute [‘dot‘, ‘-Tpdf‘, ‘-O‘, ‘pengunis‘], make sure the Graphviz executables are on your

  1. 打开cmd,输入dot -version,出现下图即成功
    failed to execute [‘dot‘, ‘-Tpdf‘, ‘-O‘, ‘pengunis‘], make sure the Graphviz executables are on your
  2. 重新在jupyter notebook中pip install graphviz, 即可使用