Ubuntu系统下python模块graphviz运行报错:graphviz.backend.execute.ExecutableNotFound: failed to execute PosixPath(‘dot‘)
代码中需要运行python模块graphviz,安装:
pip install graphviz
运行后报错:
graphviz.backend.execute.ExecutableNotFound: failed to execute PosixPath('dot'), make sure the Graphviz executables are on your systems' PATH
报错的全部信息:
Traceback (most recent call last):
File "/home/devil/anaconda3/envs/tmp2/lib/python3.7/site-packages/graphviz/backend/execute.py", line 81, in run_check
proc = subprocess.run(cmd, **kwargs)
File "/home/devil/anaconda3/envs/tmp2/lib/python3.7/subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "/home/devil/anaconda3/envs/tmp2/lib/python3.7/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/home/devil/anaconda3/envs/tmp2/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: PosixPath('dot'): PosixPath('dot')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "cartpole.py", line 76, in <module>
evaluation()
File "cartpole.py", line 56, in evaluation
visualize.draw_net(p.config, winner, True, node_names=node_names)
File "/home/devil/Desktop/neat/visualize.py", line 150, in draw_net
dot.render(filename, view=view)
File "/home/devil/anaconda3/envs/tmp2/lib/python3.7/site-packages/graphviz/_tools.py", line 171, in wrapper
return func(*args, **kwargs)
File "/home/devil/anaconda3/envs/tmp2/lib/python3.7/site-packages/graphviz/rendering.py", line 122, in render
rendered = self._render(*args, **kwargs)
File "/home/devil/anaconda3/envs/tmp2/lib/python3.7/site-packages/graphviz/_tools.py", line 171, in wrapper
return func(*args, **kwargs)
File "/home/devil/anaconda3/envs/tmp2/lib/python3.7/site-packages/graphviz/backend/rendering.py", line 327, in render
capture_output=True)
File "/home/devil/anaconda3/envs/tmp2/lib/python3.7/site-packages/graphviz/backend/execute.py", line 84, in run_check
raise ExecutableNotFound(cmd) from e
graphviz.backend.execute.ExecutableNotFound: failed to execute PosixPath('dot'), make sure the Graphviz executables are on your systems' PATH
=========================================
解决方法:
sudo apt install graphviz
PS:
原来是没安装绘图的程序,只安装了python的连接模块。
参考:
https://blog.csdn.net/iLOVEJohnny/article/details/128825005
==========================================
Ubuntu系统下python模块graphviz运行报错:graphviz.backend.execute.ExecutableNotFound: failed to execute PosixPath(‘dot‘)的更多相关文章
- ubuntu系统下Python虚拟环境的安装和使用
ubuntu系统下Python虚拟环境的安装和使用 前言:进行python项目开发的时候,由于不同的项目需要使用不同的资源包和相关的配置,因此创建多个python虚拟环境,在虚拟环境下开 ...
- ubuntu上跑python连接pg,报错 ImportError: No module named psycopg2
ubuntu上跑python连接pg,报错 ImportError: No module named psycopg2 root@pgproxy1:~# python /home/zxw/PGWri ...
- 【报错解决】Uncaught TypeError: Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'.
项目开发日记-bug多多篇(2) 同时也是 实现一些功能(3) 真的痛苦,写一天代码遇到的bug够我写三天博客. 今天是为了做一个头像功能,具体说是用户上传头像文件并且预览的功能. <div c ...
- xcode 运行报错 Command /usr/bin/codesign failed with exit code 1
因为更换了证书,导致在运行时报错 Command /usr/bin/codesign failed with exit code 1,查看了网上各种方法,最后发现以下两个值没有同步更新
- 搭建Linux(Ubuntu)系统下的Differential Datalog运行环境
DDlog is a bottom-up, incremental, in-memory, typed Datalog engine. It is well suited for writing pr ...
- 【转帖】迅为iTOP-iMX6开发板 Ubuntu系统下WiFi模块mt6620的移植
本文转自迅为论坛 :http://www.topeetboard.com 文档提供的文件如下. wpa_supplicant 拷贝到开发板 Ubuntu 系统的 /sbin 目录下,如何移植 wpa_ ...
- IMPI Python集群运行报错:
Intel MPI环境利用hostfile多主机运行下报错 HYDU_process_mfile_token (../../utils/args/args.c:523): token slots no ...
- Arcgis报错: Bad login user Failed to execute (CreateEnterpriseGeodatabase).
在使用工具Create Enterprise Geodatabase的时候报错Bad login user,开始怀疑为密码错误,然后反复在plsql中尝试发现并没有错误,很疑惑,然后去官网查询: Er ...
- git 打包报错:Maven Build时提示:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
1.使用git 升级 服务命令 mvn deploy -e 之后报错: Failed to execute goal org.apache.maven.plugins:maven-surefire- ...
- Win8 x64环境下VS2010 C#工程运行报错:没有注册类 (异常来自 HRESULT:0x80040154
来源:http://blog.sina.com.cn/s/blog_7095482001019c2v.html 问题描述: 在Win8 x64环境下,VS2010的C#工程中引用了COM组件(Acti ...
随机推荐
- 解密Prompt系列31. LLM Agent之从经验中不断学习的智能体
Agent智能体的工作流可以简单分成两种:一种是固定的静态工作流,一种是智能体自主决策的动态工作流. 静态流程的Agent举几个例子,例如新闻热点追踪推送Agent,每日新论文摘要总结Agent,它们 ...
- Mysql行转列,列转行 WITH ROLLUP 统计
Mysql行转列,列转行 WITH ROLLUP 统计 DROP TABLE IF EXISTS tb_score; CREATE TABLE tb_score( id INT(11) NOT NUL ...
- 记一次cdh6.3.2版本spark写入phoniex的错误:Incompatible jars detected between client and server. Ensure that phoenix-[version]-server.jar is put on the classpath of HBase in every region server:
Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl. ...
- 实验六-Salt本地pojie实验
[实验目的]了解Salt型密码的加密机制,学会使用本地密码pojie工具来pojieSalt型密码,了解pojie密码原理. [知识点]Salt,密码pojie [实验原理] 1.Salt概念 在密码 ...
- 淘宝二面:千万级数据中如何用Redis维护热点数据"?
MySQL里有千万条数据,但是Redis中只存10万的数据,如何保证redis中的数据都是热点数据? 我是小宋, 一个只熬夜但不秃头的Java程序员.关注我,带你轻松过面试.提升简历亮点(14个dem ...
- java 8 stream toMap问题
最近使用java的stream功能有点多,理由有2: 1)少写了不少代码 2)在性能可以接受的范围内 在巨大的collection基础上使用stream,没有什么经验.而非关键业务上,乐于使用stre ...
- Android系统启动:.rc文件
Android系统启动:.rc文件 reference : https://www.jianshu.com/p/a4c17f0110d0 以init.rc为例. .rc文件 init.rc文件由系统第 ...
- vim 中代码的折叠和打开
# vim 中代码的折叠和打开 reference: vim中代码的折叠和打开(有删改) https://www.cnblogs.com/xuxm2007/archive/2011/11/10/224 ...
- 海思SDK 学习 :001-HI_SDK 的 安装
背景 保密.不管怎么样接触到了海思SDK的开发,作为一项比较常见的技术,我们开展有关地学习. host平台 :Ubuntu 16.04 arm平台 : 3531d arm-gcc :4.9.4 概况 ...
- C#/.NET/.NET Core编程技巧练习集(学习,实践干货)
DotNet Exercises介绍 DotNetGuide专栏C#/.NET/.NET Core编程常用语法.算法.技巧.中间件.类库练习集,配套详细的文章教程讲解,助你快速掌握C#/.NET/.N ...