I have recently got my rpi5 ai kit.
I tried working using pychram, mainly for its great debugger, indexing and the convenience of an IDE.
The target is being able to run the “basic pipelines examples” scripts.
I struggled making the venv to work with pycharm using its run/debug config,
I couldn’t find any guide for it, so I’ll try describe the process here, hoping it can help similar cases in the future.
I am sure there are better ways to configure it dynamically and globally.
I couldn’t find any post about it when searching this platform (and Google) for “Pycharm”, so I figured it worth sharing.
It is likely I forgot something, please comment if you find missing steps or a better way
- Enter pychram’s setting > Project > Python interpreter > Add interpreter > direct it to
/hailo-rpi5-examples/venv_hailo_rpi5_examples/bin/python3
. That will allow you pick it from the run/debug window
- on run/debug:
the text from the environment variables: PYTHONUNBUFFERED=1;TAPPAS_POST_PROC_DIR=/usr/lib/aarch64-linux-gnu/hailo/tappas/post-process/
it is obviously depend by your installation, but I did it as the “getting started” suggests, I assume you will too.
-
on the py file, under
get_pipeline_string
, replace line 106 with 105:
+ f"hailofilter so-path=/usr/lib/aarch64-linux-gnu/hailo/tappas/post-process/libyolo_hailortpp_post.so qos=false ! "
-
Now the app runs via pycharm:
- NOTE: the debugger triggered properly by breakpoints,
Except for breakpoints the app_callback which are being “overlooked” and I haven’t figured it out yet. (will update here once I’ll fix it)