I have been struggling for a while trying to make a .py file start on a raspberry pi bootup. the file includes opencv, tensorflow and picamera usage. When i try to start the program at boot using different methods it wont start.
The methods i've tried are: /etc/rc.local (both trying to start the program directly or a .sh script that boots the program itself)
/home/pi/.config/autostart (either starting directly the program with "Exec= '/usr/bin/python3 /pathtoprogram.py') (or using an extern program called "xterm" to try and boot up the program but it fails to start the program)
.bashrc with (sudo python3 /pathtoprogram.py)
I'm atually looking for new methods. the program boots perfectly when i start it myself on the raspberry pi.
Additional info: my program is a modified version of this one: https://www.tomshardware.com/how-to/raspberry-pi-facial-recognition using the picam version.