I installed HailoRT (version 4.19.0), and it works fine from the command line. When I run: hailortcli fw-control identify
I get:
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: HAILO8L
I thought using --system-site-packages when creating the virtual environment would include the hailo module, but Python still doesn’t find it when I try to import it
What am I missing? How can I make ‘import hailo’ work in my virtual environment?
Let’s try to troubleshoot the issue step by step. Please follow these instructions:
Exit your virtual environment (if currently active) by running:
deactivate
Run the following commands outside the virtual environment:
python
import hailo
If you encounter an error at the import hailo step, it means the hailopython installation was interrupted or not installed correctly. In this case, please reinstall hailopython outside the virtual environment.
If the import hailo command succeeds without any errors, proceed to the next step.
If the import hailo command worked outside the virtual environment, re-create the virtual environment using the following command:
If none of the above steps resolve the issue, please provide a log or a screenshot of the errors you are encountering. This will help us better understand the problem.
It’s important to note that the hailortcli fw-control command is related to HailoRT, not specifically to hailopython. The fact that hailortcli fw-control works correctly indicates that HailoRT is installed and functioning properly. However, the issue seems to be with the hailopython package itself or its integration with your virtual environment.
Please let me know the results of each step, and if you need further assistance, don’t hesitate to provide more details about the errors you’re seeing.
I wanted to update you on the situation. I realized that I had previously installed pyenv on my system. After uninstalling it import hailo worked as expected in my virtual environment
I think the problem was that hailo couldn’t be installed correctly in the virtual environment because pyenv was somehow interfering with the Python environment being used