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 ...
随机推荐
- work02
第一题: 看程序说答案 int a = 10; int b = 3; int c = a + b;//13 int d = a - b;//7 int e = a * b; //30 int f = ...
- Spring源码——详细流程图(超详细)
Spring源码流程图
- http请求方式-HttpURLConnection
http请求方式-HttpURLConnection import com.alibaba.fastjson.JSON; import com.example.core.mydemo.http.Ord ...
- 原始指针 [raw pointers]
指针是一个变量,用于存储对象的内存地址. 指针广泛应用于 C 和 C++: 在堆上分配新对象 通过参数将某些函数传递给其他函数 迭代/遍历数组或其他数据结构的元素 int* p = nullptr; ...
- 【踩坑】.NET 8.0 自定义IExceptionHandler不生效
中间件实现异常处理 在ASP.NET Core里,我们可以使用中间件(Middleware)实现全局的异常处理. 如内置的异常处理中间件 UseExceptionHandler app.UseExce ...
- nacos v2.2 k8s部署启动报错:nacos server did not start because dumpservice bean construction failure. errMsg102, errllsg dataSource or tableName is null
背景 最近搭建个nacos环境,用的镜像是2.2版本的,yaml如下: nacos-conf apiVersion: v1 kind: ConfigMap metadata: name: nacos- ...
- CLR via C# 笔记 -- 字符、字符串、文本处理(14)
1. 字符串一经创建,便不能以任何方式修改,只能修改引用. 2. ToLowerInvariant() 和 ToUpperInvariant() 以忽略语言文化的方式将字符串转换为小写或大写形式.性能 ...
- C#使用RegNotifyChangeKeyValue监听注册表更改的几种方式
养成一个好习惯,调用 Windows API 之前一定要先看文档 RegNotifyChangeKeyValue 函数 (winreg.h) - Win32 apps | Microsoft Lear ...
- HBase 中的 JVM 与 GC
HBase中JVM基本配置 在JVM中,默认情况下会设置minimum heap size 为 1/64 可用物理内存,并为maximum heap size设置 1/4 的物理可用内存(不过在Jav ...
- HTTP协议 学习:0-有关概念
HTTP协议 学习:0-有关概念 背景 实际上,HHTP协议是一种比较简单的协议,它的本质上是一个文本协议,在实际开发中,我们重点关注解析对方发来的内容的过程(字符串匹配). 参考资料: HTTP H ...