Trying to run Hailo8 on raspberry pi5 running ubuntu 24.04 LTS

I can see all required software and drivers are installed and visible but still getting error, i tried two envs, one with python 3.12 and one with 3.11, both gives same error. without venv i get error with gi not installed even though its installed.

Is there any way I can fix this somehow? We cant change our ubuntu version, or change default python version as it breaks everything.

We need this to work in order to link it to ROS2 and communicate with other nodes. But i tried everything, searched all possible forums and documentation and still getting errors, how would I solve this?


(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ python basic_pipelines/detection_simple.py
Traceback (most recent call last):
  File "/home/pw/hailo-rpi5-examples/basic_pipelines/detection_simple.py", line 6, in <module>
    import hailo
ModuleNotFoundError: No module named 'hailo'

(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ python basic_pipelines/detection_simple.py
Traceback (most recent call last):
  File "/home/pw/hailo-rpi5-examples/basic_pipelines/detection_simple.py", line 6, in <module>
    import hailo
ModuleNotFoundError: No module named 'hailo'
(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ python --version
Python 3.11.13
(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ ls /dev/hailo*
/dev/hailo0
(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ sudo dmesg | grep hailo
[sudo] password for pw:
[60186.061254] hailo_pci: loading out-of-tree module taints kernel.
[60186.062847] hailo: Init module. driver version 4.20.1
[60186.063002] hailo 0000:03:00.0: Probing on: 1e60:2864...
[60186.063012] hailo 0000:03:00.0: Probing: Allocate memory for device extension, 13184
[60186.063031] hailo 0000:03:00.0: enabling device (0000 -> 0002)
[60186.063047] hailo 0000:03:00.0: Probing: Device enabled
[60186.063073] hailo 0000:03:00.0: Probing: mapped bar 0 - 00000000677b8582 16384
[60186.063080] hailo 0000:03:00.0: Probing: mapped bar 2 - 000000006bc8e98b 4096
[60186.063085] hailo 0000:03:00.0: Probing: mapped bar 4 - 00000000111ea7ad 16384
[60186.063119] hailo 0000:03:00.0: Probing: Force setting max_desc_page_size to 4096 (recommended value is 4096)
[60186.063133] hailo 0000:03:00.0: Probing: Enabled 64 bit dma
[60186.063139] hailo 0000:03:00.0: Probing: Using userspace allocated vdma buffers
[60186.063150] hailo 0000:03:00.0: Disabling ASPM L0s
[60186.063158] hailo 0000:03:00.0: Successfully disabled ASPM L0s
[60186.063294] hailo 0000:03:00.0: Writing file hailo/hailo8_fw.4.20.1.bin
[60186.128421] hailo 0000:03:00.0: File hailo/hailo8_fw.4.20.1.bin written successfully
[60186.128429] hailo 0000:03:00.0: Writing file hailo/hailo8_board_cfg.bin
[60186.128502] Failed to write file hailo/hailo8_board_cfg.bin
[60186.128504] hailo 0000:03:00.0: File hailo/hailo8_board_cfg.bin written successfully
[60186.128506] hailo 0000:03:00.0: Writing file hailo/hailo8_fw_cfg.bin
[60186.128546] Failed to write file hailo/hailo8_fw_cfg.bin
[60186.128548] hailo 0000:03:00.0: File hailo/hailo8_fw_cfg.bin written successfully
[60186.165935] hailo 0000:03:00.0: NNC Firmware loaded successfully
[60186.165940] hailo 0000:03:00.0: FW loaded, took 102 ms
[60186.178162] hailo 0000:03:00.0: Probing: Added board 1e60-2864, /dev/hailo0
[61267.355881] ptrace attach of "gst-launch-1.0 v4l2src device=/dev/video4 ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=640,height=640 ! hailonet hef-path=/home/pw/yolov8m.hef ! hailofilter ! fakesink"[118029] was attempted by "gdb gst-launch-1.0 118029"[118047]
(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ hailortcli fw-control identify
Executing on device: 0000:03:00.0
Identifying board
Control Protocol Version: 2
Firmware Version: 4.20.1 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8
Serial Number: <N/A>
Part Number: <N/A>
Product Name: <N/A>
pw@pwRPi:~/hailo-rpi5-examples$ lsmod | grep hailo
hailo_pci             118784  0
(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ dpkg -l | fgrep -i hailo | fgrep ii
ii  hailo-dkms                                       4.20.1-1ubuntu1~marco3                    all          Hailo PCIe driver
ii  hailo-tappas-core                                3.31.0+2-1ubuntu1~marco5                  arm64        This package contains the core components of the Hailo Tappas platform.
ii  hailofw                                          4.20.1-1ubuntu1~marco1                    all          Hailo firmware
ii  hailort                                          4.20.1.1-1ubuntu1~marco1                  arm64        Hailo RT is a lightweight, production-grade runtime library
ii  python3-hailort                                  4.20.1-1ubuntu1~marco1                    arm64        HailoRT Python API, which wraps the runtime library
ii  rpicam-apps-hailo-postprocess                    1.7.0-1ubuntu1~marco1                     arm64        rpicam-apps-hailo
(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ uname -a
Linux pwRPi 6.8.0-1031-raspi #35-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul  3 15:00:20 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux

Hey @Jeongmo_Kim ,

It looks like you’re missing the hailo-tappas-core-python-bindings package, which explains why hailo isn’t being found in your virtual environment but is available outside of it. As for the gi issue, this is a known edge case we’ve encountered before, which is exactly why we recommend using a virtual environment.

okay since i found out 4.22 is compatible with python 3.12 i went with those.

But now im getting errors with invalid operation when trying some examples. Why is that?

(hailo_platform_venv) pw@pw-pwRpi:~/hailo8/Hailo-Application-Code-Examples/runtime/hailo-8/python/object_detection$ python3 object_detection.py -i bus.jpg -n yolov8n.hef[HailoRT] [error] CHECK failed - Input buffer size 0 is different than expected 1228800 for input ‘yolov8n/input_layer1’[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_OPERATION(6)[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_OPERATION(6)Traceback (most recent call last):File “/home/pw/hailo8/hailo_platform_venv/lib/python3.12/site-packages/hailo_platform/pyhailort/pyhailort.py”, line 3351, in run_asynccpp_job = self._configured_infer_model.run_async(^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^hailo_platform.pyhailort._pyhailort.HailoRTStatusException: 6

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

Traceback (most recent call last):File “/home/pw/hailo8/Hailo-Application-Code-Examples/runtime/hailo-8/python/object_detection/object_detection.py”, line 170, in main()File “/home/pw/hailo8/Hailo-Application-Code-Examples/runtime/hailo-8/python/object_detection/object_detection.py”, line 164, in maininfer(args.net, args.input, args.batch_size, args.labels,File “/home/pw/hailo8/Hailo-Application-Code-Examples/runtime/hailo-8/python/object_detection/object_detection.py”, line 114, in inferhailo_inference.run()File “/home/pw/hailo8/Hailo-Application-Code-Examples/runtime/hailo-8/python/common/hailo_inference.py”, line 180, in runjob = configured_infer_model.run_async(^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File “/home/pw/hailo8/hailo_platform_venv/lib/python3.12/site-packages/hailo_platform/pyhailort/pyhailort.py”, line 3350, in run_asyncwith ExceptionWrapper():File “/home/pw/hailo8/hailo_platform_venv/lib/python3.12/site-packages/hailo_platform/pyhailort/pyhailort.py”, line 122, in exitself._raise_indicative_status_exception(value)File “/home/pw/hailo8/hailo_platform_venv/lib/python3.12/site-packages/hailo_platform/pyhailort/pyhailort.py”, line 172, in _raise_indicative_status_exceptionraise self.create_exception_from_status(error_code) from libhailort_exceptionhailo_platform.pyhailort.pyhailort.HailoRTInvalidOperationException: Invalid operation. See hailort.log for more information^CException ignored in: <module ‘threading’ from ‘/usr/lib/python3.12/threading.py’>Traceback (most recent call last):File “/usr/lib/python3.12/threading.py”, line 1622, in _shutdownlock.acquire()

pw@pw-pwRpi:~$ ls /dev/hailo*
/dev/hailo0
pw@pw-pwRpi:~$ sudo dmesg | grep hailo
[sudo] password for pw:
[ 3.766997] hailo_pci: loading out-of-tree module taints kernel.
[ 3.767008] hailo_pci: module verification failed: signature and/or required key missing - tainting kernel
[ 3.774983] hailo: Init module. driver version 4.22.0
[ 3.775131] hailo 0000:03:00.0: Probing on: 1e60:2864…
[ 3.775137] hailo 0000:03:00.0: Probing: Allocate memory for device extension, 13192
[ 3.775200] hailo 0000:03:00.0: enabling device (0000 → 0002)
[ 3.775209] hailo 0000:03:00.0: Probing: Device enabled
[ 3.775231] hailo 0000:03:00.0: Probing: mapped bar 0 - 000000009f5d6858 16384
[ 3.775237] hailo 0000:03:00.0: Probing: mapped bar 2 - 00000000eab29403 4096
[ 3.775242] hailo 0000:03:00.0: Probing: mapped bar 4 - 0000000011de0dde 16384
[ 3.775248] hailo 0000:03:00.0: Probing: Setting max_desc_page_size to 4096, (page_size=4096)
[ 3.775259] hailo 0000:03:00.0: Probing: Enabled 64 bit dma
[ 3.775262] hailo 0000:03:00.0: Probing: Using userspace allocated vdma buffers
[ 3.775268] hailo 0000:03:00.0: Disabling ASPM L0s
[ 3.775272] hailo 0000:03:00.0: Successfully disabled ASPM L0s
[ 3.775383] hailo 0000:03:00.0: Writing file hailo/hailo8_fw.bin
[ 3.847575] hailo 0000:03:00.0: File hailo/hailo8_fw.bin written successfully
[ 3.847584] hailo 0000:03:00.0: Writing file hailo/hailo8_board_cfg.bin
[ 3.847639] hailo 0000:03:00.0: File hailo/hailo8_board_cfg.bin written successfully
[ 3.847642] hailo 0000:03:00.0: Writing file hailo/hailo8_fw_cfg.bin
[ 3.847669] hailo 0000:03:00.0: File hailo/hailo8_fw_cfg.bin written successfully
[ 3.864254] hailo 0000:03:00.0: NNC Firmware loaded successfully
[ 3.864264] hailo 0000:03:00.0: FW loaded, took 88 ms
[ 3.876399] hailo 0000:03:00.0: Probing: Added board 1e60-2864, /dev/hailo0
pw@pw-pwRpi:~$ hailortcli fw-control identify
Executing on device: 0000:03:00.0
Identifying board
Control Protocol Version: 2
Firmware Version: 4.22.0 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8

pw@pw-pwRpi:~$ lsmod | grep hailo
hailo_pci 122880 0
pw@pw-pwRpi:~$ dpkg -l | fgrep -i hailo | fgrep ii
ii hailort 4.22.0 arm64 HailoRT
ii hailort-pcie-driver 4.22.0 all Hailo PCIe driver and firmware
pw@pw-pwRpi:~$ uname -a
Linux pw-pwRpi 6.8.0-1031-raspi #35-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 3 15:00:20 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
pw@pw-pwRpi:~$

2025-08-04 22:31:13.769 | ERROR | common.toolbox:init_input_source:108 - CAMERA_INDEX 0 not found.
[ WARN:0@0.278] global cap_v4l.cpp:914 open VIDEOIO(V4L2:/dev/video0): can’t open camera by index
[ERROR:0@0.282] global obsensor_uvc_stream_channel.cpp:163 getStreamChannelGroup Camera index out of range
[ WARN:0@0.282] global cap_v4l.cpp:914 open VIDEOIO(V4L2:/dev/video1): can’t open camera by index
[ERROR:0@0.285] global obsensor_uvc_stream_channel.cpp:163 getStreamChannelGroup Camera index out of range
[ WARN:0@0.307] global cap_v4l.cpp:914 open VIDEOIO(V4L2:/dev/video3): can’t open camera by index
[ERROR:0@0.310] global obsensor_uvc_stream_channel.cpp:163 getStreamChannelGroup Camera index out of range
[ WARN:0@0.330] global cap_v4l.cpp:914 open VIDEOIO(V4L2:/dev/video5): can’t open camera by index
[ERROR:0@0.333] global obsensor_uvc_stream_channel.cpp:163 getStreamChannelGroup Camera index out of range
2025-08-04 22:31:13.880 | WARNING | common.toolbox:init_input_source:110 - Available camera indices: [2, 4]
(hailo_platform_venv) pw@pw-pwRpi:~/hailo8/Hailo-Application-Code-Examples/runtime/hailo-8/python/object_detection$ python3 object_detection.py -i camera4 -n yolov8n.hef
2025-08-04 22:31:20.065 | ERROR | common.toolbox:init_input_source:133 - No valid images found in the specified path.
(hailo_platform_venv) pw@pw-pwRpi:~/hailo8/Hailo-Application-Code-Examples/runtime/hailo-8/python/object_detection$ python3 object_detection.py -i 4 -n yolov8n.hef
2025-08-04 22:31:26.288 | ERROR | common.toolbox:init_input_source:133 - No valid images found in the specified path.
(hailo_platform_venv) pw@pw-pwRpi:~/hailo8/Hailo-Application-Code-Examples/runtime/hailo-8/python/object_detection$ python3 object_detection.py -i /dev/video4 -n yolov8n.hef
2025-08-04 22:31:55.677 | ERROR | common.toolbox:init_input_source:133 - No valid images found in the specified path.
(hailo_platform_venv) pw@pw-pwRpi:~/hailo8/Hailo-Application-Code-Examples/runtime/hailo-8/python/object_detection$ python3 object_detection.py -i 4 -n yolov8n.hef
2025-08-04 22:32:20.745 | ERROR | common.toolbox:init_input_source:133 - No valid images found in the specified path.
(hailo_platform_venv) pw@pw-pwRpi:~/hailo8/Hailo-Application-Code-Examples/runtime/hailo-8/python/object_detection$ python3 object_detection.py -i bus.jpg -n yolov8n.hef
[HailoRT] [error] CHECK failed - Input buffer size 0 is different than expected 1228800 for input ‘yolov8n/input_layer1’
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_OPERATION(6)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_OPERATION(6)
Traceback (most recent call last):
File “/home/pw/hailo8/hailo_platform_venv/lib/python3.12/site-packages/hailo_platform/pyhailort/pyhailort.py”, line 3351, in run_async
cpp_job = self._configured_infer_model.run_async(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hailo_platform.pyhailort._pyhailort.HailoRTStatusException: 6

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

Traceback (most recent call last):
File “/home/pw/hailo8/Hailo-Application-Code-Examples/runtime/hailo-8/python/object_detection/object_detection.py”, line 170, in
main()
File “/home/pw/hailo8/Hailo-Application-Code-Examples/runtime/hailo-8/python/object_detection/object_detection.py”, line 164, in main
infer(args.net, args.input, args.batch_size, args.labels,
File “/home/pw/hailo8/Hailo-Application-Code-Examples/runtime/hailo-8/python/object_detection/object_detection.py”, line 114, in infer
hailo_inference.run()
File “/home/pw/hailo8/Hailo-Application-Code-Examples/runtime/hailo-8/python/common/hailo_inference.py”, line 180, in run
job = configured_infer_model.run_async(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/pw/hailo8/hailo_platform_venv/lib/python3.12/site-packages/hailo_platform/pyhailort/pyhailort.py”, line 3350, in run_async
with ExceptionWrapper():
File “/home/pw/hailo8/hailo_platform_venv/lib/python3.12/site-packages/hailo_platform/pyhailort/pyhailort.py”, line 122, in exit
self._raise_indicative_status_exception(value)
File “/home/pw/hailo8/hailo_platform_venv/lib/python3.12/site-packages/hailo_platform/pyhailort/pyhailort.py”, line 172, in _raise_indicative_status_exception
raise self.create_exception_from_status(error_code) from libhailort_exception
hailo_platform.pyhailort.pyhailort.HailoRTInvalidOperationException: Invalid operation. See hailort.log for more information
^CException ignored in: <module ‘threading’ from ‘/usr/lib/python3.12/threading.py’>
Traceback (most recent call last):
File “/usr/lib/python3.12/threading.py”, line 1622, in _shutdown
lock.acquire()
KeyboardInterrupt:

I fixed it since the hailo example github updated to go with 4.22, now its working fine