Systemd with Python environments

Brandon Rozek

August 25, 2019

It took me some time to realize why I couldn’t start a project during startup. I then realized that it was because I was using a python virtual environment and didn’t tell systemd about it.

Here’s how you can do so…

Description=Start Service
# # If you want a python webserver...

ExecStart=/bin/sh -c ". /home/brandon/Development/pythonenv/bin/activate; /home/brandon/Development/start"