thewh1teagle / zero-hid

Raspberry pi virtual HID mouse and keyboard
https://pypi.org/project/zero-hid
GNU Lesser General Public License v3.0
79 stars 18 forks source link

Do we need to create the virtual environment to import zero-hid #26

Open retrooper opened 1 week ago

retrooper commented 1 week ago

Do we need to create the virtual environment to import zero-hid? Seems like when I reboot my raspberry pi, I must setup the environment for the scripts and import to work. Anyway I can avoid this?

retrooper commented 1 week ago

I setup a startup script, if there's a better way, let me know.

thewh1teagle commented 4 days ago

Hey That's limitation in raspbian. everything you install with pip should be inside virtual environment you can execute the script directly with the python binary without activate the environment

eg.

python3 -m venv ~/venv
source ~/venv/bin/activate
install things.... 
deactivate

Now you can execute python from venv with

~/venv/bin/python ...
retrooper commented 3 days ago

One question developer. I've been using your project and it's great. I use it in combination with the Raspberry Pi. Thing is, booting up the RaspberryPi takes around 15 seconds, so I noticed it might be smarter to have it already connected to power beforehand. My python script using your project however launches the moment the system launches, meaning before the raspberry pi, in this scenario, would be connected to a computer. How can I make the script work whenever the Pi connects to a computer, even though it's already powered on by some other power source? Thanks. Currently it just does nothing when connected after the raspberrypi is already powered on and the script has been run.