ModuleNotFoundError: No module named 'hailort'

All files related to hailort are installed. However, in python, the import hailort part causes an error: ModuleNotFoundError: No module named ‘hailort’. What should I do?
hailort-4.19.0-cp310-cp310-linux_aarch64.whl and hailort-pcie-driver_4.19.0_all.deb are also installed.

pi@CM3588:~/Downloads$ hailortcli scan
Hailo Devices:
[-] Device: 0000:01:00.0
pi@CM3588:~/Downloads$ hailortcli fw-control identify
Executing on device: 0000:01:00.0
Identifying board
Control Protocol Version: 2
Firmware Version: 4.19.0 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8
Serial Number: HLLWM2B223702428
Part Number: HM218B1C2FAE
Product Name: HAILO-8 AI ACC M.2 M KEY MODULE EXT TEMP

pi@CM3588:~$ pip install hailort
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: hailort in ./.local/lib/python3.10/site-packages (4.19.0)
Requirement already satisfied: netifaces in /usr/lib/python3/dist-packages (from hailort) (0.11.0)
Requirement already satisfied: argcomplete in ./.local/lib/python3.10/site-packages (from hailort) (3.5.1)
Requirement already satisfied: contextlib2 in ./.local/lib/python3.10/site-packages (from hailort) (21.6.0)
Requirement already satisfied: numpy<2 in ./.local/lib/python3.10/site-packages (from hailort) (1.26.4)
Requirement already satisfied: verboselogs in ./.local/lib/python3.10/site-packages (from hailort) (1.7)
Requirement already satisfied: future in ./.local/lib/python3.10/site-packages (from hailort) (1.0.0)
Requirement already satisfied: netaddr in ./.local/lib/python3.10/site-packages (from hailort) (1.3.0)

Hey @hcpark

Based on your issue, it seems you might be trying to install pyhailort directly in your system environment. It’s recommended to install it in a virtual environment instead.

Here’s how to do it properly:

  1. Create and activate a new virtual environment:
virtualenv -p python<python_version> hailo_platform_venv
source hailo_platform_venv/bin/activate
  1. Install pyhailort in the activated environment:
pip install ./hailort-<version>-<python_tag>-<abi_tag>-<platform_tag>.whl

For example, with Python 3.10 and HailoRT v4.17.0 on x86_64:

virtualenv -p python3.10 hailo_platform_venv
source hailo_platform_venv/bin/activate
pip install ./hailort-4.17.0-cp310-cp310-linux_x86_64.whl

Try this approach and let me know if you still experience any issues!

1 Like

Thanks for your reply. Have a nice day. :grinning: