Upgrade HailoRT to 4.18 on RPI

Guide: Installing HailoRT 4.18 and Driver on Raspberry Pi 5

This guide covers the manual installation of HailoRT 4.18 and its driver on a Raspberry Pi 5, including setup for the Python API.

Clean Installation


Step 1: Remove Old Installations

Run the following commands:

sudo dpkg --purge hailort hailo-all hailofw hailo-tappas-core-3.28.2 hailort-pcie-driver

Then, check for any remaining Hailo files:

find /usr/lib/ | grep hailo

Delete any remaining Hailo files found.

Step 2: Install DKMS

Ensure DKMS is installed:

sudo apt install dkms

Step 3: Prepare Installation Files

Copy these files to your Raspberry Pi:

  • hailort_4.18.0_arm64.deb
  • hailort-4.18.0-cp311-cp311-linux_aarch64.whl
  • hailort-pcie-driver_4.18.0_all.deb

Step 4: Install the Driver

Install the PCIe driver:

sudo dpkg --install Downloads/hailort-pcie-driver_4.18.0_all.deb

Reboot your Raspberry Pi.


Step 5: Install HailoRT

Install HailoRT:

sudo dpkg --install Downloads/hailort_4.18.0_arm64.deb

Step 6: Set Up Python Environment

Create a virtual environment and install pyHailoRT:

python3 -m venv hailo_platform_venv
source hailo_platform_venv/bin/activate
pip install ./hailort-4.18.0-cp311-cp311-linux_aarch64.whl

Note: Replace <python_version>, <version>, <python_tag>, <abi_tag>, and <platform_tag> with the appropriate values for your system and the HailoRT version you’re installing.

PCIe Page Size Issue:

Some hosts (Like the Pi) do not support certain PCIe descriptor page sizes.
If you get an error like this:
[HailoRT] [error] CHECK_AS_EXPECTED failed - max_desc_page_size given 16384 is bigger than hw max desc page size 4096

Make sure the /etc/modprobe.d/hailo_pci.conf exists and contains the following line:
options hailo_pci force_desc_page_size=4096

To complete the installation process reboot your Pi. You can now use the HailoRT Python API within the created virtual environment.


If you want only the Python API and don’t use the rpi5 example with tappas and Gstreamer then you can skip this part.


Step 7: Install Tappas Core

First, ensure that you have all the necessary dependencies installed:

sudo apt-get install -y rsync ffmpeg x11-utils python3-dev python3-pip python3-setuptools python3-virtualenv python-gi-dev libgirepository1.0-dev gcc-12 g++-12 cmake git libzmq3-dev

If you haven’t already installed OpenCV and GStreamer (these might be installed if you were using HailoRT 4.18), make sure to do so.

Next, download the tappas_3.29.1_installer from the Hailo Developer Zone.

Once downloaded, install it by following the Guide in here: tappas/docs/installation/manual-install.rst at master · hailo-ai/tappas · GitHub

Note for Non-x86 Platforms

  1. Unzip the TAPPAS installer:
unzip tappas_VERSION_linux_installer.zip
  1. Change the directory to TAPPAS, create a directory named hailort, and clone the HailoRT sources:
cd tappas_VERSION
mkdir hailort
git clone https://github.com/hailo-ai/hailort.git hailort/sources
  1. To ensure compatibility with Raspberry Pi 5, make the following adjustment:In the downloader/common.py file of the decompressed TAPPAS directory, add a new line to include Raspberry Pi 5 as a valid platform option:
class Platform(Enum):
    X86 = 'x86'
    ARM = 'arm'
    IMX8 = 'imx8'
    Rockchip = 'rockchip'
    RaspberryPI = 'rpi'
    RaspberryPI5 = 'rpi5'  # added this line
  1. Run the installation script with the rpi5 target platform:
./install.sh --skip-hailort --target-platform rpi5
3 Likes

After doing all this process we are facing issue.

gst-inspect-1.0 hailotools
No such element or plugin ‘hailotools’

gst-inspect-1.0 hailo
No such element or plugin ‘hailo’

Hey @pk.upadhyay,

Apologies for the confusion. I’ll update the guide. You need to install Hailo Tappas Core version 3.29.1 to ensure it’s compatible with HailoRT 4.18.

I restarted the process from a fresh install so I had to massage this part out. In case anyone else is starting from afresh, I figured it’d be useful to share.

The install.sh script checks certain dependencies so which helps. So far these are the packages that seem to satisfy this requirement:

libgstreamer1.0-dev libopencv-dev libcairo2-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-tools

I installed them via apt-get and it cleared up almost all the issues. However, the original post installs gcc-12 and g++-12 where this install script seems to default to gcc-9. I haven’t worked this out yet but if @omria has any idea, I’d be inclined to defer to him.

The installation script kept stating HailoRT sources directory not found which simply meant creating a directory and cloning the repo as discussed here in the repo. Here’s the commands:

cd [tappas decompressed directory]
mkdir hailort
git clone https://github.com/hailo-ai/hailort.git hailort/sources

I think this part needs some added TLC throughout the process if you’re on the Raspberry Pi 5 though.

The value should be rpi5 as it seems to be an “acceptable” value for the CLI arg
 I believe that solves the gcc version problem I mentioned in a previous reply and completes added setup for the installation process. However, it failed when trying to run the “downloader tool” so I simply modified that script ([tappas decompressed dir]/downloader/common.py) by making this change:

     15 class Platform(Enum):
     16     X86 = 'x86'
     17     ARM = 'arm'
     18     IMX8 = 'imx8'
     19     Rockchip = 'rockchip'
     20     RaspberryPI = 'rpi'
     21     RaspberryPI5 = 'rpi5' # added this line

Afterwards, the hailo-rpi5-examples installation went without issue and I’m able to run the basic pipelines.

2 Likes

Followed all the steps but the examples don’t show any output. I can see the camera feed on the Pi5 but no bounding boxes on detected subjects. I hope the Raspberry Pi OS package for Hailo gets updated soon to make this process painless. I really wanted to play with Hailo acceleration but there is already talk in the company about just moving to Jetson Orin :frowning:

Hi Sir pk.upadhyay,

I wanted to check if you have resolved the issue you mentioned. I am encountering the same problem.

Could you please guide me? I followed the installation steps provided by Omria, but I am also facing the following issue:

gst-inspect-1.0 hailotools
No such element or plugin ‘hailotools’
gst-inspect-1.0 hailo
No such element or plugin ‘hailo’

after performing your all process still we are facing issue.

After doing all this process we are facing issue.

gst-inspect-1.0 hailotools
No such element or plugin ‘hailotools’

gst-inspect-1.0 hailo
No such element or plugin ‘hailo’

when i run the 6th step i geting this type of log:
trinity@raspberrypi:~/tappas_v3.29.1 $ ./install.sh --skip-hailort --target-platform rpi
No TAPPAS_WORKSPACE in environment found, using the default one /home/trinity/tappas_v3.29.1
Hailo Tappas was removed successfully.
To unset Tappas environment variables, please relogin or reboot the PC.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

WARNING: Requirement gcc-9 not found.
WARNING: Requirement g+±9 not found.

SYSTEM REQUIREMENTS REPORT

Component Requirement Found
========== ========== ========== ==========
Apt-Package ffmpeg V Required
Apt-Package x11-utils V Required
Apt-Package python3-dev V Required
Apt-Package python3-pip V Required
Apt-Package python3-setuptools V Required
Apt-Package libgirepository V Required
Apt-Package gcc-9 X Required
Apt-Package g+±9 X Required
Apt-Package python-gi-dev V Required
Apt-Package pkg-config V Required
Apt-Package libcairo2-dev V Required
Apt-Package libgirepository1.0-dev V Required
Apt-Package libgstreamer1.0-dev V Required
Apt-Package cmake V Required
Apt-Package libgstreamer-plugins-base1.0-dev V Required
Apt-Package libzmq3-dev V Required
Apt-Package rsync V Required
Apt-Package git V Required
Apt-Package libgstreamer-plugins-bad1.0-dev V Required
Apt-Package gstreamer1.0-plugins-base V Required
Apt-Package gstreamer1.0-plugins-good V Required
Apt-Package gstreamer1.0-plugins-bad V Required
Apt-Package gstreamer1.0-libav V Required
Apt-Package gstreamer1.0-tools V Required
Apt-Package gstreamer1.0-x V Required
Pkg_config-Package opencv4 V Required
Pkg_config-Package opencv_imgproc V Required
Pkg_config-Package opencv_core V Required
Pkg_config-Package opencv_imgcodec V Required
Pkg_config-Package opencv_features2d V Required
Pkg_config-Package opencv_calib3d V Required
Pkg_config-Package opencv_flann V Required
Package Gstreamer V Required

See system_reqs_results.log for more information.
and for this i have tried with how he @bartfoolier mentioned not works. and then unziped the installed tappas_3.29.1_linux_installer.zip moved it and then executed the as you told cmd ./install.sh --skip-hailort --target-platform rpi still it showing same requierements and the i tried by making dir of hailort and the moved and cloned repo https://github.com/hailo-ai/hailort.git hailort/sources of resources but still it showing like that only:
trinity@raspberrypi:~/tappas_v3.29.1 $ ./install.sh --skip-hailort --target-platform rpi
No TAPPAS_WORKSPACE in environment found, using the default one /home/trinity/tappas_v3.29.1
Hailo Tappas was removed successfully.
To unset Tappas environment variables, please relogin or reboot the PC.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

WARNING: Requirement gcc-9 not found.
WARNING: Requirement g+±9 not found.

SYSTEM REQUIREMENTS REPORT

Component Requirement Found
========== ========== ========== ==========
Apt-Package ffmpeg V Required
Apt-Package x11-utils V Required
Apt-Package python3-dev V Required
Apt-Package python3-pip V Required
Apt-Package python3-setuptools V Required
Apt-Package libgirepository V Required
Apt-Package gcc-9 X Required
Apt-Package g+±9 X Required
Apt-Package python-gi-dev V Required
Apt-Package pkg-config V Required
Apt-Package libcairo2-dev V Required
Apt-Package libgirepository1.0-dev V Required
Apt-Package libgstreamer1.0-dev V Required
Apt-Package cmake V Required
Apt-Package libgstreamer-plugins-base1.0-dev V Required
Apt-Package libzmq3-dev V Required
Apt-Package rsync V Required
Apt-Package git V Required
Apt-Package libgstreamer-plugins-bad1.0-dev V Required
Apt-Package gstreamer1.0-plugins-base V Required
Apt-Package gstreamer1.0-plugins-good V Required
Apt-Package gstreamer1.0-plugins-bad V Required
Apt-Package gstreamer1.0-libav V Required
Apt-Package gstreamer1.0-tools V Required
Apt-Package gstreamer1.0-x V Required
Pkg_config-Package opencv4 V Required
Pkg_config-Package opencv_imgproc V Required
Pkg_config-Package opencv_core V Required
Pkg_config-Package opencv_imgcodec V Required
Pkg_config-Package opencv_features2d V Required
Pkg_config-Package opencv_calib3d V Required
Pkg_config-Package opencv_flann V Required
Package Gstreamer V Required

See system_reqs_results.log for more information.
trinity@raspberrypi:~/tappas_v3.29.1 $

@omria any update regarding this g+±9 gcc-9

after all process and solve some issue facing other issue.

Pipeline is PREROLLING 

[HailoRT] [error] HEF format is not compatible with device. Device arch: HAILO8L, HEF arch: HAILO8
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_HEF(26)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_HEF(26)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_HEF(26)

Hey @pk.upadhyay,

This issue is related to the DFC and HailoRT version compatibility. Please check out the discussion in this community thread:

Hey @vinaygouda.ttssl,

Can you please open a new topic with this issue? I’d be happy to help you fix it.
Also, try running it with the platform being rpi5 not rpi.

Hey @kun2917,

Are you still facing the issue you mentioned earlier? If so, could you please open a new topic about it? That will help us provide better assistance in addressing your problem.

Hey @M_S,

Could you please open a new topic and provide full information about the issue you’re facing? That will allow us to better understand the problem and help you fix it.