Failed to import `pydot`. Please install `pydot`. For example with `pip install pydot`.

步骤1

pip install pydotplus

步骤2

Failed to import `pydot`. Please install `pydot`. For example with `pip install pydot`._第1张图片

在spyder进入vis_utils.py

Failed to import `pydot`. Please install `pydot`. For example with `pip install pydot`._第2张图片

但是运行还会出错,如下 

Failed to import `pydot`. Please install `pydot`. For example with `pip install pydot`._第3张图片 

 步骤3 下载https://graphviz.gitlab.io/_pages/Download/Download_windows.html

下载完后,解压,因为是绿色版,不需要安装,只需放在自己想放的地方就行,然后定位到解压文件bin目录下即可:

import os     
os.environ["PATH"] += os.pathsep + 'D:/Graphviz/bin'

结果: 

 

Failed to import `pydot`. Please install `pydot`. For example with `pip install pydot`._第4张图片

你可能感兴趣的:(Failed to import `pydot`. Please install `pydot`. For example with `pip install pydot`.)