Graphviz Not Installed
dtemir opened this issue Β· comments
π Documentation
I had an error running python -m extensions.graphviz_support.graphviz_support.tests.test_lg_graphviz_api
from the root directory even after running python setup.py install
for the extension
$ python -m extensions.graphviz_support.graphviz_support.tests.test_lg_graphviz_api
E......
======================================================================
ERROR: test_build_graph (__main__.TestLabgraphGraphvizAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/damir/miniconda3/envs/labgraph/lib/python3.8/site-packages/graphviz-0.19.1-py3.8.egg/graphviz/backend/execute.py", line 85, in run_check
proc = subprocess.run(cmd, **kwargs)
File "/home/damir/miniconda3/envs/labgraph/lib/python3.8/subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "/home/damir/miniconda3/envs/labgraph/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/home/damir/miniconda3/envs/labgraph/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: PosixPath('dot')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/damir/Git/labgraph/extensions/graphviz_support/graphviz_support/tests/test_lg_graphviz_api.py", line 94, in test_build_graph
build_graph("Demo", nodes, output_file_name, output_file_format)
File "/home/damir/Git/labgraph/extensions/graphviz_support/graphviz_support/generate_graphviz/generate_graphviz.py", line 154, in build_graph
graph_viz.render()
File "/home/damir/miniconda3/envs/labgraph/lib/python3.8/site-packages/graphviz-0.19.1-py3.8.egg/graphviz/_tools.py", line 172, in wrapper
return func(*args, **kwargs)
File "/home/damir/miniconda3/envs/labgraph/lib/python3.8/site-packages/graphviz-0.19.1-py3.8.egg/graphviz/rendering.py", line 119, in render
rendered = self._render(*args, **kwargs)
File "/home/damir/miniconda3/envs/labgraph/lib/python3.8/site-packages/graphviz-0.19.1-py3.8.egg/graphviz/_tools.py", line 172, in wrapper
return func(*args, **kwargs)
File "/home/damir/miniconda3/envs/labgraph/lib/python3.8/site-packages/graphviz-0.19.1-py3.8.egg/graphviz/backend/rendering.py", line 317, in render
execute.run_check(cmd,
File "/home/damir/miniconda3/envs/labgraph/lib/python3.8/site-packages/graphviz-0.19.1-py3.8.egg/graphviz/backend/execute.py", line 88, in run_check
raise ExecutableNotFound(cmd) from e
graphviz.backend.execute.ExecutableNotFound: failed to execute PosixPath('dot'), make sure the Graphviz executables are on your systems' PATH
----------------------------------------------------------------------
Ran 7 tests in 0.010s
I was able to resolve the issue following this WillKoehrsen/Data-Analysis#36 with sudo apt install graphviz
for Ubuntu 20.04
Fatima is having the same issue rn, we're trying to troubleshoot with Mac
brew install graphviz
this helped to Fatima
@dtemir Beside graphviz python package. Graphviz also need to be installed separately (https://graphviz.org/download/)
Please check Prerequisites for more information :
https://github.com/facebookresearch/labgraph/blob/main/extensions/graphviz_support/README.md
oh thanks so much for pointing that out. i completely missed that.