Python中文
首页
教程
问答
标签
搜索
登录
注册
找不到Graphviz的可执行文件(Python3.4)
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我在Windows7上运行Python3.4。我正在尝试将Python接口用于graphviz。这是我打算运行的脚本:</p> <pre><code>from graphviz import Digraph import pydotplus dot = Digraph(comment='The Round Table') dot.node('A', 'King Arthur') dot.node('B', 'Sir Bedevere the Wise') dot.node('L', 'Sir Lancelot the Brave') dot.edges(['AB', 'AL']) dot.edge('B', 'L', constraint='false') print(dot.source) dot.render('test-output/round-table.gv', view=True) </code></pre> <p>运行时出现以下错误:</p> <pre><code>RuntimeError: failed to execute ['dot', '-Tpdf', '-O', 'test-output/round-table.gv'], make sure the Graphviz executables are on your systems' path </code></pre> <p>现在我确信我已经正确安装了正确的依赖项。我首先尝试设置正确的环境变量。graphviz可执行文件位于<strong>C:\程序文件(x86)\ Graphviz2.37\bin</strong>中,因此我转到了环境变量部分。这里有两个部分:用户变量和系统变量。在“系统变量”下,我单击了路径</strong>,然后单击<code>Edit</code>,并将C:\程序文件(x86)Graphviz2.37\bin</strong>添加到字符串末尾并保存。这并没有消除错误。</p> <p>然后,在回答<a href="https://stackoverflow.com/questions/18438997/why-is-pydot-unable-to-find-graphvizs-executables-in-windows-8">given here</a>之后,我卸载了pydot(实际上我在这里使用了pydotplus)并重新安装了它,但仍然没有成功。</p> <p>我已经尝试了几个小时来解决这个问题,整个路径变量的事情只是混乱和令人沮丧。</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>我在Ubuntu 16.04上也遇到了这个问题。</p> <p>通过在我已经执行的pip安装之外运行<code>sudo apt-get install graphviz</code>进行修复。</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
Python闭包能否存储和更改外部标量?
8 回答
python闭包行为怪异
8 回答
python闭包问题源代码编译器
8 回答
Python问gam
7 回答
Python问答游戏逻辑E
3 回答
Python问答程序。你能帮我找出哪里出了问题吗?谢谢
6 回答
Python问答程序问题与分数
7 回答
Python问题
6 回答
Python问题 | 在https://www.testdome.com开发的代码测试分数有bug吗
2 回答
Python问题,上载文件的名称和缩略图
2 回答
python问题,将img的相对url连接到绝对url
2 回答
Python问题,机械化机器人
4 回答
Python问题,用不同的模板发送大量电子邮件?
2 回答
Python问题,类型错误:“float对象不能解释为integer”。无法在“for”循环中返回函数的值
9 回答
Python问题:“overflowerr:Python int太大,无法转换为C long”
1 回答
Python问题:“空数据帧的绑定方法NDFrame.head”
4 回答
Python问题:AttributeError:'_io.TextIOWrapper'对象没有属性'split'
4 回答
Python问题:AttributeError:'dict'对象没有'upper'属性
4 回答
Python问题:CS圆7C循环,正方形普查
2 回答
Python问题:ODE系统的参数估计,例如系数是函数
8 回答