Installation of Dataflow Compiler failed on Debian 12.7, pyenv for Python3.10

Hi friends of Hailo,
klaus@penguin:~/Hailo_DataFlow-Compiler$ sudo pip install hailo_dataflow_compiler-3.29.0-py3-none-linux_x86_64.whl
on a Debian 12.7 and
klaus@penguin:~/Hailo_DataFlow-Compiler$ pyenv versions
system

  • 3.10.15 (set by /home/klaus/Hailo_DataFlow-Compiler/.python-version)
    failed with the attached errors.
    Any ideas on what I can do to get Dataflow Compiler to work?
    Thanks,
    Klaus

Using cached types_python_dateutil-2.9.0.20241003-py3-none-any.whl (9.7 kB)
Building wheels for collected packages: pygraphviz
Building wheel for pygraphviz (pyproject.toml) … error
error: subprocess-exited-with-error

× Building wheel for pygraphviz (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [58 lines of output]
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-310/pygraphviz
copying pygraphviz/init.py → build/lib.linux-x86_64-cpython-310/pygraphviz
copying pygraphviz/agraph.py → build/lib.linux-x86_64-cpython-310/pygraphviz
copying pygraphviz/graphviz.py → build/lib.linux-x86_64-cpython-310/pygraphviz
copying pygraphviz/scraper.py → build/lib.linux-x86_64-cpython-310/pygraphviz
copying pygraphviz/testing.py → build/lib.linux-x86_64-cpython-310/pygraphviz
creating build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/init.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_attribute_defaults.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_clear.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_close.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_drawing.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_edge_attributes.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_graph.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_html.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_layout.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_node_attributes.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_readwrite.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_repr_mimebundle.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_scraper.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_string.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_subgraph.py → build/lib.linux-x86_64-cpython-310/pygraphviz/tests
copying pygraphviz/tests/test_unicode.py → build/lib.linux-x86_64-cpython-310/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 ‘.swg’
warning: no files found matching '
.png’ under directory ‘doc’
warning: no files found matching ‘.html’ 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-cpython-310/pygraphviz
copying pygraphviz/graphviz_wrap.c → build/lib.linux-x86_64-cpython-310/pygraphviz
running build_ext
building ‘pygraphviz._graphviz’ extension
creating build/temp.linux-x86_64-cpython-310/pygraphviz
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DSWIG_PYTHON_STRICT_BYTE_CHAR -I/home/klaus/.pyenv/versions/3.10.15/include/python3.10 -c pygraphviz/graphviz_wrap.c -o build/temp.linux-x86_64-cpython-310/pygraphviz/graphviz_wrap.o
pygraphviz/graphviz_wrap.c:9: warning: “SWIG_PYTHON_STRICT_BYTE_CHAR” redefined
9 | #define SWIG_PYTHON_STRICT_BYTE_CHAR
|
: note: this is the location of the previous definition
pygraphviz/graphviz_wrap.c:3023:10: fatal error: graphviz/cgraph.h: No such file or directory
3023 | #include “graphviz/cgraph.h”
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command ‘/usr/bin/gcc’ failed with exit code 1
[end of output]

Hey @Klaus ,

Welcome to the Hailo Community!

The error fatal error: graphviz/cgraph.h: No such file or directory means pygraphviz can’t find the required Graphviz development headers. Let’s fix this:

  1. First, install Graphviz development libraries:
sudo apt-get update
sudo apt-get install graphviz graphviz-dev
  1. Then try installing the Hailo Dataflow Compiler again:
sudo pip install hailo_dataflow_compiler-3.29.0-py3-none-linux_x86_64.whl
  1. If you get compiler errors, make sure gcc is installed:
sudo apt-get install build-essential
  1. Since you’re using pyenv, verify you’re on the correct Python version:
pyenv shell 3.10.15

This should resolve the installation error. Let me know if you need any further help.

1 Like

Thanks omria! Your first two steps were sufficient to install the Hailo Dataflow compiler. Your help is very much appreciated.
klaus@penguin:~/Hailo_DataFlow-Compiler_2nd$ hailo -h
[info] Current Time: 15:43:44, 10/31/24
[info] CPU: Architecture: , Model: Intel(R) Core™ i7-7Y75 CPU @ 1.30GHz, Number Of Cores: 4, Utilization: 0.0%
[info] Memory: Total: 14GB, Available: 13GB
[info] System info: OS: Linux, Kernel: 6.6.30-02728-g8557330097f3
[info] Hailo DFC Version: 3.29.0

klaus@penguin:~/Hailo_DataFlow-Compiler_2nd$ pyenv versions
system

  • 3.10.15 (set by /home/klaus/Hailo_DataFlow-Compiler_2nd/.python-version)
1 Like