Problem Summary
I’m experiencing a runtime issue when running a PyInstaller-built executable of my AI application that uses the Hailo8L accelerator and DeGirum tools on a Raspberry Pi 5 running Raspbian.
The application works perfectly when executed directly via Python (
python person_recognition.py
), but fails only after being packaged with PyInstaller.
Error:
degirum.exceptions.DegirumException: Model 'yolo11n_silu_coco--640x640_quant_hailort_hailo8l_1' does not have any supported runtime/device combinations that will work on this system.
System Context
- Hardware: Raspberry Pi 5
- OS: Raspbian (64-bit)
- Acceleration: Hailo8L
- AI SDK: DeGirum tools
- Model:
yolo11n_silu_coco--640x640_quant_hailort_hailo8l_1
- Packaging Tool: PyInstaller (one-folder and one-file modes both tested)
What Works
- Running the app directly using the Python interpreter loads the model and executes inference successfully using the Hailo8L device.
- The Hailo runtime and DeGirum setup are correctly installed and functioning in the native environment.
What Fails
- When the exact same code is packaged using PyInstaller, running the resulting binary throws the above
DegirumException
. - It appears the packaged app cannot detect or interface with the Hailo runtime/device.
My Hypothesis
- PyInstaller might be omitting some essential shared libraries or runtime configs used by the Hailo runtime.
- There may be environment variables or device detection logic that breaks inside the frozen PyInstaller environment.
- DeGirum or Hailo may rely on dynamic linking or device initialization paths that aren’t preserved in the PyInstaller build.
What I’ve Tried
- Running PyInstaller with:
--collect-all degirum
--add-binary
for suspected.so
files--debug all
to trace import and execution logs
- Comparing
os.environ
andsys.path
between native and packaged executions - Manually verifying that Hailo runtime libraries are present in the dist folder