Error: No module named 'hailo_apps_infra'

As the title suggest, I’m struggling to get the ‘hailo_apps_infra’ working on my RaspberryPi5.

To get to the position I’m in I took these steps…

  1. git clone GitHub - hailo-ai/hailo-rpi5-examples
  2. ‘cd’ into the newly generated ‘hailo-rpi5-examples’
  3. run ‘./install.sh’
  4. run ‘source ./setup_env.sh’
  5. cd over to my python project and run ‘python main.py’

At this point python throws an error for this import statement…

from hailo_apps_infra.hailo_rpi_common import (
    get_default_parser,
    detect_hailo_arch,
)

citing.. "ModuleNotFoundError: No module named ‘hailo_apps_infra’ ".

I’ve tried a fair few things without any luck, including..

  • Fresh reinstalling (three times)
  • Verified that hailo_apps_infra is found by ‘pip freeze | grep hailo’
  • Ensured all dependencies are installed

I checked for other topics similar to this and noticed an identical one, ModuleNotFoundError: No module named 'hailo_apps_infra', however following the steps here did not work either.

Running ./run_tests.sh fails 18 out of 37 tests, which has been identical each time I’ve reinstalled. Most cite ‘process failed with error code 1.’ which I assume is a general error outside of my control, however some say that it can’t find the rpi5’s camera, which we’ve verified to be connected. I’m going to take a shot in the dark and say all tests should be passing, or is it known to be that some are failing right now?

If any more information is needed to make this fix I’m happy to provide as much as possible. Has anyone dealt with this before and got some advice?

Hey @Lewis_Wardman ,

Welcome to the Hailo Community!

Do you still have this error ?
If yes then please use this release Release 2025/03 · hailo-ai/hailo-rpi5-examples · GitHub

Hi @omria

Thanks! No I don’t have this error anymore, I’m still really unsure on why it was relating to the solution but what I don’t know can’t hurt me :sweat_smile:

I checked to see if the camera I was using was being found, it was found by Cheese but not by the program since it was a USB camera (again not sure why that is the case).

So running…

libcamera-hello --list-cameras

.. returned “No cameras available!”. However running …

v4l2-ctl --list-devices

… returned that the camera was available at /dev/video{X}. With X usually being 0, 1 or 2.

Running the program by specifying the USB camera as the input worked just fine, then I never had to specify the input again.

python basic_pipelines/detection.py -i /dev/video{X}

Now running the tests again passed more (though still not all), so it seemed that the webcam had actually been found and used by the program.

so going back to my project, running…

python main.py

Worked perfectly, without having to specify any input.

Like I said, I have no idea why any of this relates to each other, but I hope it helps someone else who has a similar issue :smiling_face:

1 Like