使用keras时出现 `pydot` failed to call GraphViz的解决办法
问题来源于使用了 keras.utils.plot_model,报错内容为:
2018-08-29 08:58:21.937037: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
/home/you/Documents/workspace/PycharmProjects/venv/lib/python3.6/site-packages/keras/engine/saving.py:269: UserWarning: No training configuration found in save file: the model was *not* compiled. Compile it manually.
warnings.warn('No training configuration found in save file: '
Traceback (most recent call last):
File "/home/you/Documents/workspace/PycharmProjects/venv/lib/python3.6/site-packages/pydot.py", line 1861, in create
stderr=subprocess.PIPE, stdout=subprocess.PIPE)
File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'dot': 'dot' During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/home/you/Documents/workspace/PycharmProjects/venv/lib/python3.6/site-packages/keras/utils/vis_utils.py", line 26, in _check_pydot
pydot.Dot.create(pydot.Dot())
File "/home/you/Documents/workspace/PycharmProjects/venv/lib/python3.6/site-packages/pydot.py", line 1867, in create
raise OSError(*args)
FileNotFoundError: [Errno 2] "dot" not found in path. During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/home/you/Documents/workspace/PycharmProjects/venv/src/test.py", line 8, in <module>
plot_model(model, to_file=MODEL_PNG)
File "/home/you/Documents/workspace/PycharmProjects/venv/lib/python3.6/site-packages/keras/utils/vis_utils.py", line 132, in plot_model
dot = model_to_dot(model, show_shapes, show_layer_names, rankdir)
File "/home/you/Documents/workspace/PycharmProjects/venv/lib/python3.6/site-packages/keras/utils/vis_utils.py", line 55, in model_to_dot
_check_pydot()
File "/home/you/Documents/workspace/PycharmProjects/venv/lib/python3.6/site-packages/keras/utils/vis_utils.py", line 29, in _check_pydot
'`pydot` failed to call GraphViz.'
OSError: `pydot` failed to call GraphViz.Please install GraphViz (https://www.graphviz.org/) and ensure that its executables are in the $PATH. Process finished with exit code 1
第一反应是pip3 install graphviz,但安装完后依然不好使。
后来查官网可以使用apt install graphviz,问题解决。
使用keras时出现 `pydot` failed to call GraphViz的解决办法的更多相关文章
- Ubuntu pydot failed to call GraphViz.Please install GraphViz 解决方法
如果遇到: OSError: `pydot` failed to call GraphViz.Please install GraphViz (https://www.graphviz.org/) a ...
- Android SDK安装时出错“android Failed to rename directory”的解决方法
Android SDK安装时出错"android Failed to rename directory"的解决的方法 安装Android SDK时遇到Failed to r ...
- JVM 崩溃 Failed to write core dump解决办法 WINDOWS
JVM 崩溃 Failed to write core dump解决办法 WINDOWS MIT key words: JVM,崩溃,windows,Failed,core dump,虚拟内存 最近从 ...
- 关于jquery html()方法获取带有OBJECT标签的元素内容时,出现“类型不匹配。”的解决办法
关于jquery html()方法获取带有OBJECT标签的元素内容时,出现“类型不匹配.”的解决办法 解决办法: $("selector").clone().html()
- PLSQL往Oracle数据库插入中文后变为问号 和 启动PLSQL时提示NLS_LANG在客户端不能确定的解决办法
PLSQL往Oracle数据库插入中文后变为问号 和 启动PLSQL时提示NLS_LANG在客户端不能确定的解决办法 1.检查服务器的字符编码 Select * from V$NLS_PARAMETE ...
- @PathVariable出现点号"."时导致路径参数截断获取不全的解决办法
@PathVariable出现点号"."时导致路径参数截断获取不全的解决办法 比如,我路径是/test/{name},name的值是1.2.3.4,后台用@PathVariable ...
- excel双击文件打开时空白,使用菜单打开正常的解决办法
excel双击文件打开时空白,使用菜单打开正常的解决办法 打开 excel的选项 找到高级->常规 取消“忽略使用动态数据交换...”的勾,确定. 问题解决.
- WPF 在TextBox失去焦点时检测数据,出错重新获得焦点解决办法
WPF 在TextBox失去焦点时检测数据,出错重新获得焦点解决办法 在WPF的TextBox的LostFocus事件中直接使用Focus()方法会出现死循环的问题 正确的使用方式有2中方法: 方法一 ...
- Vue微信自定义分享时安卓系统config:ok,ios系统config:invalid signature签名错误,或者安卓和ios二次分享时均config:ok但是分享无效的解决办法
简述需求:要求指定页面可以进行微信自定义分享(自定义标题,描述,图片,链接),剩下的页面隐藏所有基础接口.二次分享依然可以正常使用,切换至其他页面也可以正常进行自定义分享. 这两天在做微信自定义分享的 ...
随机推荐
- Spring 框架的设计理念与设计模式分析(山东数漫江湖)
Spring 的骨骼架构 Spring 总共有十几个组件,但是真正核心的组件只有几个,下面是 Spring 框架的总体架构图: 图 1 .Spring 框架的总体架构图 从上图中可以看出 Spring ...
- 【洛谷 P2761】 软件补丁问题(状态压缩,最短路)
题目链接 第四题. 初看题目很懵,网络流这么厉害的吗,毫无头绪去看题解.. 所以这和网络流有什么关系呢? 把规则用二进制保存下来,然后跑最短路救星了. 在线跑,离线连边太慢了. (以后干脆不管什么题直 ...
- js_md5加密和base64的加密解密
1.最近有些人在爬我们公司的数据,然有了这个md5加密的小需求.为什么叫小需求呢?嗯,之前没做过,会以为很复杂. 其实,是想多了. 2.前端md5加密,其实也并不是安全的,因为代码是可见的.也就是说, ...
- JavaScript match() 方法
match() 方法可在字符串内检索指定的值,或找到一个或多个正则表达式的匹配. 该方法类似 indexOf() 和 lastIndexOf(),但是它返回指定的值,而不是字符串的位置. var st ...
- go环境变量及build文件
package main /* windows go环境设置: # 参考:https://blog.csdn.net/quicmous/article/details/80360126 GOROOT ...
- 64_k1
KoboDeluxe-0.5.1-22.fc26.x86_64.rpm 13-Feb-2017 22:11 1626454 k3b-17.04.1-1.fc26.x86_64.rpm 25-May-2 ...
- python爬虫模块之URL管理器模块
URL管理器模块 一般是用来维护爬取的url和未爬取的url已经新添加的url的,如果队列中已经存在了当前爬取的url了就不需要再重复爬取了,另外防止造成一个死循环.举个例子 我爬www.baidu. ...
- An unhandled exception of type 'System.TypeInitializationException' occurred in System.ServiceModel.dll
异常“ An unhandled exception of type 'System.TypeInitializationException' occurred in System.ServiceMo ...
- C# 使用HttpWebRequest Post提交数据,携带Cookie和相关参数示例
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- 大小端 Big-Endian 与 Little-Endian
应该说没做底层开发(硬件或驱动)的人很可能不会彻底理解大小端的概念,大小端不是简单的一句“大端在前”还是“小端在前”能够概括的问题.在cpu, 内存, 操作系统, 编译选项, 文件,网络传输中均有大小 ...