Python 3 and mod_wsgi
John.Florian at dart.biz
John.Florian at dart.biz
Mon Apr 14 17:41:48 UTC 2014
I naively ported my Django app to Python 3 and didn't realize WSGI was
going to be an issue. I saw python3-django was available for Fedora 20
and thought I was all set until I saw in my httpd logs that python2.7
seems to be the assumed default for mod_wsgi. After reading the README
and more, I see the writing on the wall:
"""
If you have multiple versions of Python installed and you are not using
that which is the default, you may have to organise that the PATH
inherited
by the Apache application when run will result in Apache finding the
alternate version. Alternatively, the WSGIPythonHome directive should
be used to specify the exact location of the Python installation
corresponding to the version of Python compiled against. If this is not
done, the version of Python running within Apache may attempt to use the
Python modules from the wrong version of Python.
"""
I take this to mean that merely fiddling with WSGIPythonHome alone will be
insufficient and that I would need to recompile the package. Is that
correct, or did I miss a Python3-specific mod_wsgi package or some other
neater solution? If I am truly forced to recompile -- as reversing the
Python 3 is really undesirable at this point -- is there any reason Fedora
couldn't have two mod_wsgi packages (one for Python2 and another for
Python3)?
--
John Florian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/devel/attachments/20140414/80fc1621/attachment.html>
More information about the devel
mailing list