问题:
之前用python的一些库,大多都是直接pip install xxx就可。但是今天用这个安装graphviz后,用的时候出现了问题
graphviz.backend.ExecutableNotFound: failed to execute [‘dot’, ‘-Tpdf’, ‘-O’, ‘computer’], make sure the Graphviz executables are on your systems’ PATH
解决:
这个库无法像其他库一样通过pip直接安装,可以通过dot -version检查安装是否成功,但是pip之后往往是不行的。需要下载安装后配置环境变量才可使用。
1.下载graphviz:https://graphviz.org/download/
2.配置环境变量(在安装时有一步勾选上可自动配置,否则自行配置)
3.安装成功后: