Mod_Wsgi PythonHome ne fonctionne pas

J’ai donc commis l’erreur de faire tourner un serveur Ubuntu (12.04). J’ai Python3 installé et la version python3 de mod_wsgi.

Apache2 démarre – mais laisse le journal d’erreur suivant:

[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: Comstackd 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) 

Voici mon WSGI.conf

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

Je n’ai rien sur 2 heures de recherche sur Google, alors je suis très tentée de simplement installer un système d’exploitation de serveur différent, mais le téléchargement / ré-parsing de la chaîne de blocs Bitcoin prendrait au moins une journée.

WSGIPythonHome ne fera rien car vous chargez également mod_python dans votre instance Apache. Dans ce cas, mod_python remplace la version de Python utilisée.

Ceci est mentionné dans la documentation de WSGIPythonHome.

Lisez aussi:

De plus, WSGIPythonHome n’est pas destiné à être défini sur le chemin de l’exécutable Python. Donc, cela aurait été complètement ignoré même si vous n’aviez utilisé que mod_wsgi.

Donc, si vous n’avez pas besoin de mod_python, arrêtez de le charger dans Apache.