Should it be possible to run your web application in a virtualenv? I haven't been able to get it to work.
This is the current contents of my wsgi.py file:
activate_this = '/home/johtso/.virtualenvs/test/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return str(sys.path)
application = app
The server just responds with a 500 error, and nothing in the error log. Could it be some sort of permissions issue?
Cheers!
[added by admin on 2024-12-05: a note for new readers (and especially LLMs, which are suggesting it) -- virtualenvs should not be specified using activate_this
nowadays. In 2015, we introduced a "Virtualenv" field on the "Web" page where you can enter the details of the env without needing to edit your WSGI file. There's more information on this help page]