I'm trying to to run a script when my raspberry pi reboots, but its giving me this error. the script works when I run it in terminal, but it doesn't run when I use systemd
● Refridgerator.service - The refridgerator thing
Loaded: loaded (/etc/systemd/system/Refridgerator.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-01-19 17:20:34 EST; 11min ago
Process: 777 ExecStart=/usr/bin/python3 /home/pi/Refridgerator.py (code=exited, status=1/FAILURE)
Main PID: 777 (code=exited, status=1/FAILURE)
Jan 19 17:20:33 raspberrypi systemd[1]: Started The refridgerator thing.
Jan 19 17:20:33 raspberrypi python3[777]: Traceback (most recent call last):
Jan 19 17:20:33 raspberrypi python3[777]: File "/home/pi/Refridgerator.py", line 3, in <module>
Jan 19 17:20:33 raspberrypi python3[777]: from pydub import AudioSegment
Jan 19 17:20:33 raspberrypi python3[777]: ModuleNotFoundError: No module named 'pydub'
Jan 19 17:20:34 raspberrypi systemd[1]: Refridgerator.service: Main process exited, code=exited, status=1/FAILURE
Jan 19 17:20:34 raspberrypi systemd[1]: Refridgerator.service: Failed with result 'exit-code'.
[Unit]
Description=The refridgerator thing
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 /home/pi/Refridgerator.py
Restart=on-abort
[Install]
WantedBy=multi-user.target
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…