Python3 not seeing modules venv

I am trying to run a Python3 script at startup that waits for keyboard input on webpage and then refreshes the page.
I am running a PI5 using XServer for the webpage so it has no desktop for people to use.
This is just a self checkout device for our library and all it has attached is a barcode scanner. I have it working just refreshing the webpage every 20 seconds but would like to make it so it only refreshes 20 seconds after the barcode scanner is used.
I have working code but it will not launch from either cronjob or as systemd service without error.
I either get import error on pyautogui or permission denied.

I have tried throl’s guide, she bang to my venv and multiple other ideas but with the same result.

Is this a dietpi thing or most likely am I trying to start this in the wrong place or with the wrong settings.
Obviously I want it to run contentiously since there is no mouse or keyboard attached.

Any help or guidance would be appreciated.