How can I start a python script on boot?
I tried adding a bash command on rc.local, it doesn’t work.
I tried to create a service, it doesn’t work.
it should work in both cases, I’ve been using those approaches for initializing my BassOwl-HAT before having a proper Linux driver
pay attention to declare the full path for both python and script, something like that
here you have an example of a script that creates a python script and installs a service that runs the script on boot
Oct 22 19:52:51 volumio rc.local: import mpd
Oct 22 19:52:51 volumio rc.local: ModuleNotFoundError: No module named ‘mpd’
Oct 22 20:06:18 volumio rc.local: import RPi.GPIO as GPIO
Oct 22 20:06:18 volumio rc.local: ModuleNotFoundError: No module named ‘RPi’
I think you have problems in your script, not in the way you launch it.
It looks like you don’t have all the required python modules in your system.
did you try to launch the script directly from terminal?