Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.
2017-09-16 00:28
441 查看
windows平台下,pip安装pydot和graphviz:
pip install pygot
pip install graphviz
测试时:
import
pydot
print
pydot.find_graphviz()
结果返回None
绘图运行时还出现如下错误:
raise ImportError :Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.
归根到底就是,pydot找不到Graphviz的可执行文件,包括dot.exe, twopi.exe, neato.exe.
这个在pydot安装目录的_init_.py文件中有说明:
找到graphviz安装目录,发现根本没有这三个exe文件,原因就是windows平台下不能用pip安装graphviz。
于是 http://www.graphviz.org/Download_windows.php 处下载graphviz的msi或者zip文件,安装后,在path添加环境变量指向graphviz的bin目录(该目录下有那几个exe文件),然后重新打开python环境测试,出现:
表示安装成功!
参考文献:
http://blog.csdn.net/wangjian1204/article/details/50346457 http://blog.csdn.net/u011274209/article/details/52892255
pip install pygot
pip install graphviz
测试时:
import
pydot
pydot.find_graphviz()
结果返回None
绘图运行时还出现如下错误:
raise ImportError :Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.
归根到底就是,pydot找不到Graphviz的可执行文件,包括dot.exe, twopi.exe, neato.exe.
这个在pydot安装目录的_init_.py文件中有说明:
找到graphviz安装目录,发现根本没有这三个exe文件,原因就是windows平台下不能用pip安装graphviz。
于是 http://www.graphviz.org/Download_windows.php 处下载graphviz的msi或者zip文件,安装后,在path添加环境变量指向graphviz的bin目录(该目录下有那几个exe文件),然后重新打开python环境测试,出现:
表示安装成功!
参考文献:
http://blog.csdn.net/wangjian1204/article/details/50346457 http://blog.csdn.net/u011274209/article/details/52892255
相关文章推荐
- ImportError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.
- ImportError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.
- Failed to import pydot. You must install pydot and graphviz for pydotprint to work
- ImportError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.
- ImportError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.
- Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.
- Failed to import pydot. You must install pydot and graphviz...-keras使用pydot出错(ubuntu16.04)
- python-Xgboost可视化问题 You must install graphviz to plot tree
- install pydot and graphviz for win10
- Failed to import pydot 和graphviz error: (2, 'RegOpenKeyEx',错误总结
- 转一篇blog,这个人思路蛮清晰的 [do you want to work for a company with uninvolved management and a sweatshop mentality in which you occasionally see those people superior to you?]
- ImportError: You must install PIL to fetch image objects
- MySQL复制错误 The slave I/O thread stopsbecause master and slave have equal MySQL server UUIDs; these UUIDs must bedifferent for replication to work 解析
- Could not install the app on the device, read the error above for details. Make sure you have an And
- 安装ipython,使用scrapy shell来验证xpath选择的结果 | How to install iPython and how does it work with Scrapy Shell
- Q: How to generate exe install and uninstall file for an eclipse product?
- for my life value and my dream to work hard ,
- Howto Install and Configure Doxygen for QtCreator on Ubuntu
- Custom tool error: Failed to generate code for the service reference ××××××. Please check other error and warning messages for details.
- How to use calltree and Graphviz/CodeViz