Question

Does Feodora's mod_wsgi support python 3?

I can use virtualenv to build python 2 environment for mod_wsgi, and it works fine. But when I build the environment for python 3 the error log always says:

 ImportError: No module named site

I just use WSGIPythonHome point to /path/to/py3venv

How can I configure mod_wsgi for python 3?

Était-ce utile?

La solution

You cannot take a mod_wsgi compiled for one Python version and forcibly point it at a virtual environment for another Python version. The mod_wsgi binary must be compiled for the specific Python version you want to use.

In other words, you cannot force a mod_wsgi compiled for Python 2.X, to use a virtual environment for Python 3.X.

So, if your mod_wsgi is for Python 2.X, remove it and install the variant of the package for Python 3, or compile it yourself from source code.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top