views:

1372

answers:

2

Has anybody succeeded with mod_wsgi 2.5 on Ubuntu 9.04 with default Python installation (2.6.2)?

I got compilation errors:

mod_wsgi.c:119:2: error: #error Sorry, mod_wsgi requires at least Python 2.3.0.
mod_wsgi.c:123:2: error: #error Sorry, mod_wsgi requires that Python supporting thread.

which Python gives /usr/bin/python and /usr/bin/python -V returns Python 2.6.2 so I'm not sure what's wrong with the 1st one, and honestly I don't know how to check options used in compiling default Python on Ubuntu.

There are a lot of other errors but those 2 looks most relevant.

What else could be possibly wrong??

+2  A: 

Perhaps the user that the server is running as does not have /usr/bin on its path, and there is another version of python somewhere else on the path that is < 2.3

Try:

which -a python

to find all of the pythons on your path. Perhaps one of these is what the server is running.

Mike Boers
It's something else:$ which -a python/usr/bin/python/usr/bin/X11/python$ /usr/bin/X11/python -VPython 2.6.2I just got a suggestion on IRC that apt-get install python2.6-dev should resolve my problem.Another suggestion, more clean looking, is to install libapache2-mod-wsgi.
piobyz
Worth a shot tho. :)
Mike Boers
+5  A: 

From your errors I see that you're having to compile python extensions. If you haven't already, I suggest you install the python-dev package because it's usually required for compiling python extensions and it's not part of the default installation.

Installing the package is as easy as running:

sudo apt-get install python-dev

from a command line.

David Locke