ZmEventNotification: how to use a python virtual environment instead of system python

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
Post Reply
bzzmid
Posts: 2
Joined: Sat Aug 17, 2024 11:10 am

ZmEventNotification: how to use a python virtual environment instead of system python

Post by bzzmid »

Hello to all,

I've googled around but I've not found anything relevant: in case it was right beneath my eyes, I'm sorry.

I'd like to install zmeventnotification in such a way it can use a custom python virtual environment (with all the packets ZM ES needs) instead of the default system-wide installation of python.

I've noticed that the first two lines of install.sh are:

Code: Select all

PYTHON=${PYTHON:-python3}
PIP=${PIP:-pip3}
I was wondering whether it would be enough to hard edit the two variables to the path to a custom virtual environment. Is there anything else that should be edited and I'm not aware of?

Thank you in advance
volfan6415
Posts: 9
Joined: Tue Apr 03, 2018 1:10 pm

Re: ZmEventNotification: how to use a python virtual environment instead of system python

Post by volfan6415 »

Any updates here? I had a working eventnotification server and upgraded to 24.04 and now python is complaining about needing a virtual environment to get the machine learning hooks setup. What is the proper path forward?
User avatar
burger
Posts: 442
Joined: Mon May 11, 2020 4:32 pm

Re: ZmEventNotification: how to use a python virtual environment instead of system python

Post by burger »

I ran into this when installing on Debian 12 / Devuan 5. I just set it to --break-system-packages for the time being. It's not critical enough for me to troubleshoot further. See: https://wiki.zoneminder.com/ZMES#This_e ... ystem-wide,
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
Post Reply