import site site.addsitedir('INSTALLDIR/venv/lib/PYTHON_VERSION/site-packages') #virtualenv = 'INSTALLDIR/venv/bin/activate' #with open(virtualenv) as file_: # exec(file_.read(), dict(__file__=virtualenv)) from APPNAME import app as application