How to solve import errors while trying to deploy Flask using WSGI on Apache2

Thanks to zarf and damjan on irc.freenode.org at #pocoo, they were able to help me get this fixed. The problem was the PythonPath was not correct. We fixed this by using the following wsgi.py

import sys
sys.path.insert(0, "/sites/flaskfirst")

from app import app
application = app

Leave a Comment