On Ubuntu 14.04, using Apache2 with package libapache2-mod-wsgi-py3 installed gives errors in /var/log/apache2/error.log
The way to reproduce is straightforward :
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 gives the following error :
[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:
How to get it work error-free?
virtualenv -p python3.4 DIRECTORY
, or for 3.4+, better:pyvenv-3.4 DIRECTORY
. – Alexia Luna Jan 06 '15 at 15:40cannot open shared object file: No such file or directory
) when trying to do this, remember to switch the version in step 3. I was using Python 3.5, 64-bit.mod_wsgi-py35.cpython-35m-x86_64-linux-gnu.so
. If you don't know which version you have, go to the folder (/usr/lib/apache2/modules/
) and look.This answer seems to be based on 32-bit python 3.4.
– CoderGuy123 Oct 15 '16 at 04:05sudo /venv_path/bin/mod_wsgi-express install-module
in step 3 will print the paths that you need to put in thewsgi_express
files – gevra Oct 30 '17 at 21:39