πŸ“Œ RPi5 + AI HAT Plus: HailoRT 4.20.0 "No module named 'hailort'

Hello Hailo Team,

We are working on a high-speed, event-driven AI inference system optimized for Raspberry Pi 5 AI HAT Plus. Our architecture goal is:
:white_check_mark: Minimal C++ core for inference speed (HailoRT) :rocket:
:white_check_mark: Event-based AI pipeline using a Python microservice (FastAPI) :globe_with_meridians:
:white_check_mark: Libcamera/Picamera2 for direct camera access (bypassing GStreamer overhead) :camera:
:white_check_mark: Hailo Apps Infra for low-latency AI model execution :zap:


:rotating_light: Issue

After installing HailoRT 4.20.0, we encounter:

ModuleNotFoundError: No module named 'hailort'

Yet, pip3 list | grep hailort confirms:

hailort 4.20.0

Finding hailort on the system:

find /usr -name "hailort"

Returns:

/usr/lib/python3/dist-packages/hailo_platform/drivers/hailort
/usr/share/doc/hailort

Even with PYTHONPATH set:

export PYTHONPATH=/usr/lib/python3/dist-packages:$PYTHONPATH
python3 -c "import hailort; print(hailort.__version__)"

:x: Still fails with β€œNo module named β€˜hailort’”.


:hammer_and_wrench: Steps We’ve Tried

  1. Reinstalling HailoRT:

    pip3 uninstall hailort -y && pip3 install hailort --no-cache-dir
    

    :x: Still fails

  2. Activating Hailo SDK Setup (If Required):

    cd ~/hailo_sdk_installation/
    source setup.sh
    

    :x: Still fails

  3. Checking Python Environment:

    which python3 && python3 --version && pip3 --version
    

    :white_check_mark: Only one Python version is installed (Python 3.11)


:mag: Our Architecture Goals

We are building a high-performance AI pipeline where:

  • C++ handles inference for maximum speed. :racing_car:
  • Python FastAPI serves events and AI results. :earth_africa:
  • Picamera2 (Libcamera) directly feeds frames into Hailo models. :movie_camera:
  • WebSockets provide live AI updates instead of polling. :arrows_counterclockwise:

Given this, our primary concern is how to correctly load and use HailoRT in a mixed C++/Python system.


:question: Key Questions

  1. Is hailort expected to be imported as hailo_platform.hailort or something else in 4.20.0?
  2. Does HailoRT 4.20 require an additional environment setup?
  3. Would a direct C++ integration of HailoRT bypass this Python issue entirely?
  4. Should we be using hailo-apps-infra differently for RPi5 AI HAT Plus?

Would appreciate any insights from the community! :rocket:


:link: Related Post

RPI 4.20 Release Update Discussion

Hello,
I want to optimize a facial recognition application with Hailo. I get exactly the same error, I followed the same steps. The HailoRT version is 4.20 and is updated.