相关疑难解决方法(0)

安装Graphviz 2.38后,"RuntimeError:确保Graphviz可执行文件在您的系统路径上"

我下载了Graphviz 2.38MSI版本并安装在文件夹下C:\Python34,然后我运行pip install Graphviz,一切顺利.在系统的路径中我添加了C:\Python34\bin.当我尝试运行测试脚本时filename=dot.render(filename='test'),我收到了一条消息

 RuntimeError: failed to execute ['dot', '-Tpdf', '-O', 'test'], make sure the Graphviz executables are on your systems' path
Run Code Online (Sandbox Code Playgroud)

我试图放入"C:\Python34\bin\dot.exe"系统的路径,但它不起作用,我甚至创建了一个"GRAPHVIZ_DOT"有价值的新环境变量"C:\Python34\bin\dot.exe",仍然无法正常工作.我试图卸载Graphviz并点击卸载graphviz,然后重新安装它并重新安装pip,但没有任何效果.

整个回溯消息是:

Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\graphviz\files.py", line 220, in render
    proc = subprocess.Popen(cmd, startupinfo=STARTUPINFO)
  File "C:\Python34\lib\subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "C:\Python34\lib\subprocess.py", line 1112, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified …
Run Code Online (Sandbox Code Playgroud)

python installation graphviz

96
推荐指数
17
解决办法
12万
查看次数

标签 统计

graphviz ×1

installation ×1

python ×1