I am trying to get uwsgi working in combination with nginx for a flask application. This is UWSGI ini file:
[uwsgi]
socket = 127.0.0.1:8001
processes = 4
module = run:manager
virtualenv = /var/www/test/venv
chdir = /var/www/test
logto = uwsgi.log
In the directory /var/www/test I have this file run.py
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager
from app import app, db
if __name__ == "__main__":
migrate = Migrate(app, db)
manager = Manager(app)
manager.add_command('db', MigrateCommand)
manager.run()
When I run it I get this error:
Set PythonHome to /var/www/test/
ImportError: No module named site
Can anyone tell me where I am going wrong please?