Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upDocumentation for Flask + mod_wsgi + pyvenv + Python 3 doesn't work #1948
Labels
Comments
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


It says in the documentation (the last section - "Working with Virtual Environments"):
However
activate_this.pyis no longer present in pyvenv (see http://bugs.python.org/issue21496), thus the above code doesn't work. I found a stackoverflow answer where it said that just copyingactivate_this.pyfrom a 2.7 virtualenv might work, however I didn't go down that route.How I managed to get it working:
I added
WSGIPythonHome /path/to/envto the top level of my apache config (ie. outside of VirtualEnv). However that might be a little to big of a hammer if people want to run multiple applications in the same Apache instance. In that case settingpython-pathonWSGIDaemonProcessmight work (however I didn't try it out).