문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top