Hailo_platform and raspberry pi 5

Hello,how can we perform object detection with YOLOv8 on a Raspberry Pi 5 using the hailo_platform library? Is there an example code available that works with Python?

Hey @faikkom66,

The hailo_platform is the Python API for Hailo. You can check out some examples at the following link: Hailo Application Code Examples.

Hi,
when i run the example , i get hailo_platform ModuleNotFound error:

(venv) pi@raspberrypi:~/Hailo-Application-Code-Examples-main/runtime/python/object_detection $ ./object_detection.py -n ./yolov7.hef -i zidane.jpg
Traceback (most recent call last):
File “/home/pi/Hailo-Application-Code-Examples-main/runtime/python/object_detection/./object_detection.py”, line 17, in
from utils import HailoAsyncInference, load_input_images, validate_images, divide_list_to_batches
File “/home/pi/Hailo-Application-Code-Examples-main/runtime/python/utils.py”, line 8, in
from hailo_platform import (HEF, VDevice,
ModuleNotFoundError: No module named ‘hailo_platform’

Please advice how to solve it

Hey @kyurrii

It appears you’re working in a Python virtual environment where pyhailort isn’t installed. You have two options:

  1. Run your code directly on the OS (outside the virtual environment) where pyhailort is likely already installed
  2. If you prefer to stay in your virtual environment, you can install pyhailort within it
1 Like

Hello, I have the same issue.
When I try to install pyhailort in my venv I get this message:


How did you solve the import oh the library hailo_platform ?

Hey @Arsiezis ,

Welcome to the Hailo Community!

To install the necessary package that includes pyhailort, use the following command:

sudo apt install hailo-all

Please note: This package is only available on Raspberry Pi OS.

Thank you for your quick answer omria.
I already install the hailo-all package.
pi@raspberrypi:~ $ dpkg -l | grep hailo
ii hailo-all 4.20.0 all Hailo support (metapackage)
ii hailo-tappas-core 3.31.0+1-1 arm64 This package contains the core components of the Hailo Tappas platform.
ii hailofw 4.20.0-1 all
ii hailort 4.20.0-1 arm64
ii python3-hailort 4.20.0-1 arm64 y
ii rpicam-apps-hailo-postprocess 1.6.0-2 arm64

but when I want to use in python the hailo_plateform library, I can’t.

I am on Raspbian

1 Like

Same error happened to me.

Hello @omria,

Do you have any suggestions to correctly install the package in a virtual env to have hailo_plateform module?

Thanks in advance

1 Like

I wanted to access to hailo_examples/lane_detections using UFLDv2. I knew I need to install hailo_platform through hailort installation. I downloaded .whl from Hailo SW downloads and now I am getting

“HAILO_OUT_OF_PHYSICAL_DEVICES (74)” ERRORS.