No Ubuntu 14.04, o uso do Apache2 com o pacote libapache2-mod-wsgi-py3 instalado gera erros no /var/log/apache2/error.log
A maneira de reproduzir é simples:
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 fornece o seguinte erro:
[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:
Como fazê-lo funcionar sem erros?
virtualenv -p python3.4 DIRECTORY
, ou para 3.4+, melhor:pyvenv-3.4 DIRECTORY
.