systemd service

I created a service to run my webapp using the Systemd method.  When I was trying to run the file I got this error saying that ‘sqlalchemy’ module could not be found.  I kept trying to install it in many different ways.  The final solution was to make sure I installed in for my python 3 environment and make sure I install all the packages using sudo and then run the application as sudo.

install package using sudo:
     sudo python3 -m pip install sqlalchemy


The .service file looks something like:


ExecStart=/usr/bin/python3 /BaseWebApp/webapp/ > /BaseWebApp/webapp/application.log 2>&1


There really is no reason to expect that the file being run is will be run be root (or it just isn’t apparent)