Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4495

Python • Automatic start up of main.py

$
0
0
I did fresh installation of latest raspbian-bookworm 64bit on my RPi-4 and script main.py in folder Project. I have installed some neded libraries in folder env inside of the folder Project and I can manualy start main.py by command:

Code:

(env) $ python main.py
Extra line was added to autostart:

Code:

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart@lxterminal -e /home/vlado/Project/env/bin/python3 /home/vlado/Project/main.py
After reboot nothing happend. This command worked normally few months ago.
What I am missing?

Complete proces of seting project:

Code:

$ mkdir Project$ cd Project$ python -m venv env$ ls -la$ source env/bin/activate                          (env) $ which python(env) $ pip install pyqtgraph==0.12(env) $ pip install pyexcel(env) $ pip install pyexcel-xls(env) $ pip install xlrd(env) $ pip install xlwt(env) $ pip install xlutils(env) $ pip install psutil(env) $ pip list(env) $ ls -la(env) $ python -m venv --system-site-packages env     (env) $ python main.pysudo nano /etc/xdg/lxsession/LXDE-pi/autostart@lxterminal -e /home/vlado/Project/env/bin/python3 /home/vlado/Project/main.py
Regards, Vlado

Statistics: Posted by California — Sun May 19, 2024 4:33 pm — Replies 2 — Views 40



Viewing all articles
Browse latest Browse all 4495

Trending Articles