Traceback (most recent call last):
File "C:\Users\Adam\AppData\Local\Programs\Python\Python311\Lib\site-packages\graphviz\backend\execute.py", line 78, in run_check
proc = subprocess.run(cmd, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Adam\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Adam\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Adam\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\Users\Adam\Desktop\study\code\python\代码\模块、函数练习\graph测试\1.py", line 34, in <module>
gra.view()
^^^^^^^^^^
File "C:\Users\Adam\AppData\Local\Programs\Python\Python311\Lib\site-packages\graphviz\_tools.py", line 171, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Adam\AppData\Local\Programs\Python\Python311\Lib\site-packages\graphviz\rendering.py", line 185, in view
return self.render(filename=filename, directory=directory, view=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Adam\AppData\Local\Programs\Python\Python311\Lib\site-packages\graphviz\_tools.py", line 171, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Adam\AppData\Local\Programs\Python\Python311\Lib\site-packages\graphviz\rendering.py", line 122, in render
rendered = self._render(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Adam\AppData\Local\Programs\Python\Python311\Lib\site-packages\graphviz\_tools.py", line 171, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Adam\AppData\Local\Programs\Python\Python311\Lib\site-packages\graphviz\backend\rendering.py", line 326, in render
execute.run_check(cmd,
File "C:\Users\Adam\AppData\Local\Programs\Python\Python311\Lib\site-packages\graphviz\backend\execute.py", line 81, in run_check
raise ExecutableNotFound(cmd) from e
graphviz.backend.execute.ExecutableNotFound: failed to execute WindowsPath('dot'), make sure the Graphviz executables are on your systems' PATH