Hailo DFC installation issues

Hallo
I tried to install DFC 3.28.0 on ubuntu 22.04.4 LTS…first I created a conda env then launched
pip install hailo_dataflow_compiler-3.28.0-py3-none-linux_x86_64.whl
the installation ended with error on pygraphviz. See below:

Building wheels for collected packages: pwlf, pygraphviz, pyDOE
Building wheel for pwlf (setup.py) … done
Created wheel for pwlf: filename=pwlf-2.2.1-py3-none-any.whl size=16608 sha256=c06549670677ad0e5997f1634242a0246527196004bfcc69c7d8472a9b9baf8e
Stored in directory: /home/admin-ubuntu/.cache/pip/wheels/d9/13/6f/a9201ce279d71065ce782d82418d7c6877be6bb818ae0d1095
Building wheel for pygraphviz (setup.py) … error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [55 lines of output]
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/init.py → build/lib.linux-x86_64-3.10/pygraphviz
copying pygraphviz/scraper.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/testing.py → build/lib.linux-x86_64-3.10/pygraphviz
creating 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_close.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_scraper.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_attribute_defaults.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_edge_attributes.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_readwrite.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/test_subgraph.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_graph.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
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DSWIG_PYTHON_STRICT_BYTE_CHAR -I/usr/include/python3.10 -c pygraphviz/graphviz_wrap.c -o build/temp.linux-x86_64-3.10/pygraphviz/graphviz_wrap.o
pygraphviz/graphviz_wrap.c:3020:10: fatal error: graphviz/cgraph.h: No such file or directory
3020 | #include “graphviz/cgraph.h”
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command ‘/usr/bin/x86_64-linux-gnu-gcc’ failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pygraphviz
Running setup.py clean for pygraphviz
Building wheel for pyDOE (setup.py) … done
Created wheel for pyDOE: filename=pyDOE-0.3.8-py3-none-any.whl size=18184 sha256=d6f23b255cf777a225830023c2dde11a69b021b5c9761148fa6358ab482cfa54
Stored in directory: /home/admin-ubuntu/.cache/pip/wheels/ce/b6/d7/c6b64746dba6433c593e471e0ac3acf4f36040456d1d160d17
Successfully built pwlf pyDOE
Failed to build pygraphviz
Installing collected packages: webencodings, wcwidth, verboselogs, py-cpuinfo, pure-eval, mpmath, libclang, flatbuffers, fastjsonschema, dm-tree, disjoint-set, wrapt, widgetsnbextension, websocket-client, webcolors, uri-template, tzdata, typing-extensions, types-python-dateutil, typeguard, traitlets, tqdm, tornado, tomli, tinycss2, termcolor, tensorflow-io-gcs-filesystem, tensorflow-estimator, tensorboard-data-server, tabulate, sympy, soupsieve, sniffio, setuptools, send2trash, rpds-py, rfc3986-validator, rfc3339-validator, pyzmq, python-json-logger, python-dateutil, pygraphviz, pygments, pycparser, pyasn1, py, psutil, protobuf, prompt-toolkit, prometheus-client, prettytable, platformdirs, pbr, parso, pandocfilters, packaging, overrides, numpy, networkx, nest-asyncio, msgpack, mistune, mdurl, MarkupSafe, markdown, kiwisolver, keras, jupyterlab-widgets, jupyterlab-pygments, jsonref, jsonpointer, json5, humanfriendly, h11, grpcio, google-pasta, gast, fqdn, fonttools, executing, exceptiongroup, defusedxml, decorator, debugpy, cycler, contextlib2, cloudpickle, charset-normalizer, cachetools, bleach, babel, attrs, astunparse, asttokens, argcomplete, absl-py, werkzeug, tflite, testresources, terminado, tensorflow-probability, tensorflow-addons, stack-data, scipy, rsa, requests, referencing, qtpy, pydantic, pyasn1-modules, pandas, opt-einsum, onnx, ml-dtypes, matplotlib-inline, markdown-it-py, jupyter-core, jinja2, jedi, httpcore, h5py, contourpy, comm, coloredlogs, cffi, beautifulsoup4, async-lru, arrow, anyio, rich, requests-oauthlib, pyDOE, onnxruntime, onnx-tf, matplotlib, jupyter-server-terminals, jupyter-client, jsonschema-specifications, jaxlib, isoduration, ipython, httpx, google-auth, argon2-cffi-bindings, pwlf, onnxsim, jsonschema, jax, ipywidgets, ipykernel, google-auth-oauthlib, argon2-cffi, tensorboard, qtconsole, nbformat, jupyter-console, tensorflow, nbclient, jupyter-events, nbconvert, jupyter-server, notebook-shim, jupyterlab-server, jupyter-lsp, jupyterlab, notebook, jupyter, hailo-dataflow-compiler
WARNING: The script cpuinfo is installed in ‘/home/admin-ubuntu/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script wsdump is installed in ‘/home/admin-ubuntu/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script tqdm is installed in ‘/home/admin-ubuntu/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script tabulate is installed in ‘/home/admin-ubuntu/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script isympy is installed in ‘/home/admin-ubuntu/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script send2trash is installed in ‘/home/admin-ubuntu/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Running setup.py install for pygraphviz … error
error: subprocess-exited-with-error

× Running setup.py install for pygraphviz did not run successfully.
│ exit code: 1
╰─> [68 lines of output]
running install
/home/admin-ubuntu/.local/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

          ********************************************************************************
          Please avoid running ``setup.py`` directly.
          Instead, use pypa/build, pypa/installer or other
          standards-based tools.
  
          See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
          ********************************************************************************
  
  !!
    self.initialize_options()
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-310
  creating build/lib.linux-x86_64-cpython-310/pygraphviz
  copying pygraphviz/__init__.py -> build/lib.linux-x86_64-cpython-310/pygraphviz
  copying pygraphviz/scraper.py -> build/lib.linux-x86_64-cpython-310/pygraphviz
  copying pygraphviz/graphviz.py -> build/lib.linux-x86_64-cpython-310/pygraphviz
  copying pygraphviz/agraph.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/test_repr_mimebundle.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/__init__.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_attribute_defaults.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_edge_attributes.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_readwrite.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_clear.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
  copying pygraphviz/tests/test_graph.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
  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-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
  creating build/temp.linux-x86_64-cpython-310/pygraphviz
  x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DSWIG_PYTHON_STRICT_BYTE_CHAR -I/usr/include/python3.10 -c pygraphviz/graphviz_wrap.c -o build/temp.linux-x86_64-cpython-310/pygraphviz/graphviz_wrap.o
  pygraphviz/graphviz_wrap.c:3020:10: fatal error: graphviz/cgraph.h: No such file or directory
   3020 | #include "graphviz/cgraph.h"
        |          ^~~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pygraphviz

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Hi @dario.ravarro,
Can you try to create a python venv not using conda?
If you don’t have it installed, run sudo apt-get install python3-dev, create the venv with python3 -m venv NAME_OF_ENV, activate it and try to install.

Regards,

1 Like

I tried with venv and got the same error

Hi @dario.ravarro,
If you try to install pygraphviz as a stand alone in a clean virtual env, does this issue still occurs?

Regards,

I installed it under WSL in another machine and worked fine. I think it’s because previously I forgot to install some prerequisites. Thanks

2 Likes

this worked out for me(: thanks

I had a similar error, but this suggestion solved it and I was able to successfully install dataflow compiler. thank you.