Sur Ubuntu 14.04, l'utilisation d'Apache2 avec le paquet libapache2-mod-wsgi-py3 installé donne des erreurs dans /var/log/apache2/error.log
La façon de se reproduire est simple:
sudo apt-get install apache2
sudo service apache2 restart
# /var/log/apache2/error.log is "clean"
sudo apt-get install libapache2-mod-wsgi-py3
sudo service apache2 restart
/var/log/apache2/error.log donne l'erreur suivante:
[Mon Jan 05 16:51:53.641332 2015] [:error] [pid 3141:tid 140703516379008] Exception ignored in: <module 'threading' from '/usr/lib/python3.4/threading.py'>
[Mon Jan 05 16:51:53.643563 2015] [:error] [pid 3141:tid 140703516379008] Traceback (most recent call last):
[Mon Jan 05 16:51:53.643633 2015] [:error] [pid 3141:tid 140703516379008] File "/usr/lib/python3.4/threading.py", line 1288, in _shutdown
[Mon Jan 05 16:51:53.644350 2015] [:error] [pid 3141:tid 140703516379008] assert tlock is not None
[Mon Jan 05 16:51:53.643449 2015] [:error] [pid 3140:tid 140703516379008] Exception ignored in: <module 'threading' from '/usr/lib/python3.4/threading.py'>
[Mon Jan 05 16:51:53.644456 2015] [:error] [pid 3140:tid 140703516379008] Traceback (most recent call last):
[Mon Jan 05 16:51:53.644514 2015] [:error] [pid 3140:tid 140703516379008] File "/usr/lib/python3.4/threading.py", line 1288, in _shutdown
[Mon Jan 05 16:51:53.645052 2015] [:error] [pid 3140:tid 140703516379008] assert tlock is not None
[Mon Jan 05 16:51:53.645119 2015] [:error] [pid 3141:tid 140703516379008] AssertionError:
[Mon Jan 05 16:51:53.647513 2015] [:error] [pid 3140:tid 140703516379008] AssertionError:
Comment le faire fonctionner sans erreur?
virtualenv -p python3.4 DIRECTORY
, ou pour 3.4+, mieux:pyvenv-3.4 DIRECTORY
.