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>在win10中的jupyter(ipython)笔记本上,我在安装graphviz之后通过<code>pip install graphviz</code>解决了这个问题</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
python语法错误(如果不在Z中,则在X中表示s)
2 回答
Python语法错误(无效)概率
9 回答
python语法错误*带有可选参数的args
1 回答
python语法错误2.5版有什么办法解决吗?
7 回答
Python语法错误2.7.4
10 回答
python语法错误30/09/2013
4 回答
Python语法错误E001
1 回答
Python语法错误not()op
9 回答
python语法错误outpu
8 回答
Python语法错误print len()
10 回答
python语法错误w3
1 回答
Python语法错误不是caugh
1 回答
python语法错误及yt-packag的使用
4 回答
python语法错误可以查出来!!瓦里亚布
9 回答
Python语法错误可能是缩进?
3 回答
Python语法错误和缩进
1 回答
Python语法错误在while循环中生成随机numb
1 回答
Python语法错误在哪里?
9 回答
python语法错误在尝试导入包时,但仅在远程运行时
2 回答
Python语法错误在电子邮件地址提取脚本中
5 回答