Question

So I made the mistake of running a Ubuntu Server (12.04). I have Python3 installed and the python3 version of of mod_wsgi.

Apache2 starts - but leaves the following error log:

[Mon May 05 11:00:24 2014] [error] python_init: Python version mismatch, expected '2.7.2+', found '2.7.3'.
[Mon May 05 11:00:24 2014] [error] python_init: Python executable found '/usr/bin/python'.
[Mon May 05 11:00:24 2014] [error] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/$
[Mon May 05 11:00:24 2014] [notice] mod_python: Creating 8 session mutexes based on 80 max processes and 0 max threads.
[Mon May 05 11:00:24 2014] [notice] mod_python: using mutex_directory /tmp
[Mon May 05 11:00:24 2014] [warn] mod_wsgi: Compiled for Python/3.2.2+.
[Mon May 05 11:00:24 2014] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Mon May 05 11:00:24 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.11 with Suhosin-Patch mod_python/3.3.1 Python/2.7.3 mod_wsgi/3.3 configured$
[Mon May 05 11:00:25 2014] [notice] child pid 10860 exit signal Segmentation fault (11)
[Mon May 05 11:00:25 2014] [notice] child pid 10861 exit signal Segmentation fault (11)
[Mon May 05 11:00:25 2014] [notice] child pid 10863 exit signal Segmentation fault (11)
[Mon May 05 11:00:27 2014] [notice] child pid 10864 exit signal Segmentation fault (11)
[Mon May 05 11:00:27 2014] [notice] child pid 10865 exit signal Segmentation fault (11)

Here is my WSGI.conf

<IfModule mod_wsgi.c>

WSGIPythonHome /usr/bin/python3.2
WSGIPythonPath /home/user/.virtualenvs/my_env/lib/python3.2/site-packages/

</IfModule>

I've got nothing out of 2 hours of googling - so I'm very tempted to just install a different server OS, but re-uploading / re-parsing the Bitcoin blockchain would take at least a day.

Was it helpful?

Solution

WSGIPythonHome will not do anything because you are also loading mod_python into your Apache instance. In that case, mod_python overrides what Python version is being used.

This is mentioned in the documentation for WSGIPythonHome.

Also read:

Also, WSGIPythonHome is not meant to be set to the path for the Python executable anyway. So that would have been completely ignored even if you had only been using just mod_wsgi.

So, if you don't need mod_python, stop loading it into Apache.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top