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

Troubleshooting • Re: Problem with auto starting of Python code from sh script

$
0
0
You may need to set the PYTHONPATH environment variable to help python locate libraries. I would encourage you to use a systemd service to run your python / shell script instead of using cron.

PYTHONPATH won't be set under cron. Setting it may help as long as it's set correctly and in the correct place.

Moving to a systemd service will only help if fully configured with user, working directory, and dependencies set. Without that you'll just hit the same problem.

Statistics: Posted by thagrol — Fri Jan 19, 2024 10:28 am



Viewing all articles
Browse latest Browse all 3213

Trending Articles