On 20/02/2015, at 11:48 AM, [email protected] wrote:
> The issue was as you suspected: homebrew's mod_wsgi was built for python 2.7.
> In addition,
>
> pip install mod_wsgi
>
> resulted in it being built for 2.7 as well. As a solution, since pip is
> bundled with the python install, I had to execute
>
> pip3 install mod_wsgi
>
> and update the LoadModule path to
>
>
> /usr/local/lib/python3.4/site-packages/mod_wsgi-4.4.9-py3.4-macosx-10.10-x86_64.egg/mod_wsgi/server/mod_wsgi-py34.so
>
> in the Apache conf file. Now, the site is running on the Python 3.4
> virtualenv.
>
> Given that this is an easy mistake to make, particularly given the
> proliferation of Python 2.7.x installed along with 3.x on the same machines,
> it would make sense for the install documentation to reflect the differences
> in installations for 2.7.x & 3.x environments.
>
> Thanks for the hint to get this issue fixed!
If you use:
pip install mod_wsgi
The easy way to find out where the module was put so you know what to use in
the Apache configuration to load the module is to run:
$ mod_wsgi-express module-location
/Users/graham/Projects/mod_wsgi/venv/lib/python2.7/site-packages/mod_wsgi-4.4.9-py2.7-macosx-10.8-intel.egg/mod_wsgi/server/mod_wsgi-py27.so
This isn't all you need though, as you would need to tell Apache what virtual
environment or Python installation, if in non standard place, to use.
You can also have mod_wsgi-express install it into the Apache configuration if
you wanted to do that instead and in doing that it will output what you should
then add to the Apache configuration, including the directive, to tell mod_wsgi
where the Python virtual environment was.
$ mod_wsgi-express install-module
LoadModule wsgi_module /usr/libexec/apache2/mod_wsgi-py27.so
WSGIPythonHome /Users/graham/Projects/mod_wsgi/venv
You would use 'sudo' with that if Apache is system one and not writable
directory for modules.
If using for development, just using mod_wsgi-express in a window tends to be
easier.
Graham
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.