Answer the question
In order to leave comments, you need to log in
Why doesn't autorun of a python program work with kivy?
Hello!
There is a python3 program using kivy, I registered it for autorun on raspberry in /etc/rc.local.
Specifically the line: sudo python3 /home/pi/pyt/untitled1.py &
raspbian is loaded in command line mode.
But for some reason, she does not want to start, she swears at the lack of kivy.
While you immediately run the program manually and it starts normally.
The program in autostart without kivy starts normally.
Sorry, the screen does not load on the site
https://yadi.sk/i/20Efx3fOUKNh9Q
Answer the question
In order to leave comments, you need to log in
sudo vim /etc/systemd/system/untitled1service
[Service]
ExecStart=/usr/bin/kivy /home/pi/pyt/untitled1.py
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=untitled1
User=root
Group=root
WorkingDirectory= /home/pi/pyt/
[Install]
WantedBy=multi-user.target
I tried to start with a 10 second delay, the result is the same.
I tried to write a program that will run the program I need:
import os
os.system('python3 ./pyt/untitled1.py')
The result is the same when autoloading the intermediary program and when manually starting the intermediary.
Although manually running untitled1.py is fine.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question