Add `pygraphviz` as optional dependency
Summary
Installation of OMPCBench fails in some environments when installing the pygraphviz dependency. Some header files realted to GraphViz are not found.
Stack Trace
Below is the installation log provided by @guilherme.valarini via Slack.
Building wheels for collected packages: pygraphviz
Building wheel for pygraphviz (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /prj/parceirosbr/guilherme.valarini/programs/miniconda3/envs/ompcbench/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rl3yq_x2/pygraphviz_41f4b7faa84d4b0d9b2857dd35841b5c/setup.py'"'"'; __file__
='"'"'/tmp/pip-install-rl3yq_x2/pygraphviz_41f4b7faa84d4b0d9b2857dd35841b5c/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().r
eplace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-mllcq7o2
cwd: /tmp/pip-install-rl3yq_x2/pygraphviz_41f4b7faa84d4b0d9b2857dd35841b5c/
Complete output (57 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.10
creating build/lib.linux-x86_64-3.10/pygraphviz
copying pygraphviz/scraper.py -> build/lib.linux-x86_64-3.10/pygraphviz
copying pygraphviz/testing.py -> build/lib.linux-x86_64-3.10/pygraphviz
copying pygraphviz/graphviz.py -> build/lib.linux-x86_64-3.10/pygraphviz
copying pygraphviz/agraph.py -> build/lib.linux-x86_64-3.10/pygraphviz
copying pygraphviz/__init__.py -> build/lib.linux-x86_64-3.10/pygraphviz
creating build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_attribute_defaults.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_subgraph.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_readwrite.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_unicode.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_drawing.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_string.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_close.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_scraper.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_repr_mimebundle.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_edge_attributes.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_graph.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_html.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_clear.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/__init__.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_node_attributes.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
copying pygraphviz/tests/test_layout.py -> build/lib.linux-x86_64-3.10/pygraphviz/tests
running egg_info
writing pygraphviz.egg-info/PKG-INFO
writing dependency_links to pygraphviz.egg-info/dependency_links.txt
writing top-level names to pygraphviz.egg-info/top_level.txt
reading manifest file 'pygraphviz.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.png' under directory 'doc'
warning: no files found matching '*.txt' under directory 'doc'
warning: no files found matching '*.css' under directory 'doc'
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '.svn' found anywhere in distribution
no previously-included directories found matching 'doc/build'
adding license file 'LICENSE'
writing manifest file 'pygraphviz.egg-info/SOURCES.txt'
copying pygraphviz/graphviz.i -> build/lib.linux-x86_64-3.10/pygraphviz
copying pygraphviz/graphviz_wrap.c -> build/lib.linux-x86_64-3.10/pygraphviz
running build_ext
building 'pygraphviz._graphviz' extension
creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/pygraphviz
gcc -pthread -B /prj/parceirosbr/guilherme.valarini/programs/miniconda3/envs/ompcbench/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem /prj/parceirosbr/guilherme.valarini/programs/miniconda3/envs/ompcbe
nch/include -fPIC -O2 -isystem /prj/parceirosbr/guilherme.valarini/programs/miniconda3/envs/ompcbench/include -fPIC -I/prj/parceirosbr/guilherme.valarini/programs/miniconda3/envs/ompcbench/include/python3.10 -c pygraphviz/graphviz_wrap.c -o build/temp.lin
ux-x86_64-3.10/pygraphviz/graphviz_wrap.o
In file included from /usr/include/graphviz/gvc.h:17:0,
from pygraphviz/graphviz_wrap.c:2712:
/usr/include/graphviz/types.h:49:20: fatal error: cgraph.h: No such file or directory
#include <cgraph.h>
^
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for pygraphviz
Steps to reproduce
Run the installation producedure at Santos Dumont cluster:
pip install -e .
Related Issues: