tox-dev / pipdeptree

A command line utility to display dependency tree of the installed Python packages

Home Page:https://pypi.python.org/pypi/pipdeptree

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pipdeptree --graph-output doesn't work as expected

JiayuanL opened this issue · comments

C:\Python310>pipdeptree --graph-output pdf > dependencies.pdf
Traceback (most recent call last):
File "C:\Python310\lib\site-packages\graphviz\backend\execute.py", line 79, in run_check
proc = _run_input_lines(cmd, input_lines, kwargs=kwargs)
File "C:\Python310\lib\site-packages\graphviz\backend\execute.py", line 99, in _run_input_lines
popen = subprocess.Popen(cmd, stdin=subprocess.PIPE, **kwargs)
File "C:\Python310\lib\subprocess.py", line 969, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Python310\lib\subprocess.py", line 1438, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Python310\lib\runpy.py", line 196, in run_module_as_main
return run_code(code, main_globals, None,
File "C:\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Python310\Scripts\pipdeptree.exe_main
.py", line 7, in
File "C:\Python310\lib\site-packages\pipdeptree_init
.py", line 884, in main
output = dump_graphviz(tree, output_format=args.output_format, is_reverse=args.reverse)
File "C:\Python310\lib\site-packages\pipdeptree_init
.py", line 620, in dump_graphviz
return graph.pipe().decode("utf-8")
File "C:\Python310\lib\site-packages\graphviz\piping.py", line 104, in pipe
return self._pipe_legacy(format,
File "C:\Python310\lib\site-packages\graphviz_tools.py", line 171, in wrapper
return func(*args, **kwargs)
File "C:\Python310\lib\site-packages\graphviz\piping.py", line 121, in _pipe_legacy
return self._pipe_future(format,
File "C:\Python310\lib\site-packages\graphviz\piping.py", line 161, in _pipe_future
return self._pipe_lines(*args, input_encoding=self.encoding, **kwargs)
File "C:\Python310\lib\site-packages\graphviz\backend\piping.py", line 161, in pipe_lines
proc = execute.run_check(cmd, capture_output=True, quiet=quiet, **kwargs)
File "C:\Python310\lib\site-packages\graphviz\backend\execute.py", line 84, 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

commented

try to check the PATH variable and locate Graphviz executables. If you use msys2, scoop or vcpkg, just search and install the package.