I have a raspberry pi 4 with python and pyenv installed.
Usually my routine to launch RedBot is to do the following...
tmux
pyenv shell redbot
redbot gunther
and it launches....
I'm trying to setup a service to do this for me on reboot.
[Unit]
Description=%I redbot
After=multi-user.target
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/home/pi/.pyenv/versions/redbot/bin/python -O -m redbot %I --no-prompt
User=pi
Group=pi
Type=idle
Restart=always
RestartSec=15
RestartPreventExitStatus=0
TimeoutStopSec=10
[Install]
WantedBy=multi-user.target
When this runs it says no module 'redbot' found. I'm thinking something to do with the env / paths ? But I've no clue. Please help!
Dec 30 00:49:26 raspberrypi systemd[1]: Started gunther redbot.
Dec 30 00:49:26 raspberrypi python[7787]: /home/pi/.pyenv/versions/redbot/bin/python: No module named redbot
Dec 30 00:49:26 raspberrypi systemd[1]: red@gunther.service: Main process exited, code=exited, status=1/FAILURE
Dec 30 00:49:26 raspberrypi systemd[1]: red@gunther.service: Failed with result 'exit-code'.