How do you install mod_wsgi?

I ran the following commands

sudo apt-get install libapache2-mod-wsgi
sudo a2enmod mod-wsgi

I keep getting this extremely frustrating message

ERROR: Module mod-wsgi does not exist!

Please help.


Using sudo a2enmod wsgi should enable the module for you once you reload apache, as most modules don't need the mod_ prefix when enabling them.


sudo nano /etc/apache2/mods-available/wsgi.load

add the next string to the file

LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so

save, then

sudo a2enmod wsgi
sudo service apache2 restart