Mod_wsgi 2.5 on Ubuntu 9.04 with Python 2.6.2 installed

Has anyone succeeded with mod_wsgi 2.5 on Ubuntu 9.04 with the 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 provides / usr / bin / python and / usr / bin / python -V returns Python 2.6.2, so I'm not sure what happened to the 1st and honestly I don't know how to check the options. used when compiling Python by default on Ubuntu.

There are many other errors, but these 2 seem to be the most relevant.

What else could be wrong?

+1


a source to share


2 answers


From your errors, I can see that you need to compile python extensions. If you haven't done so already, I suggest you install the python-dev package as it is usually required to compile python extensions and is not part of the default installation.

Installing a package is as easy as running:



sudo apt-get install python-dev

from the command line.

+5


a source


Perhaps the user the server is running does not have / usr / bin in its path and there is another python version somewhere else in the path which is <2.3

Try:



which -a python

      

to find all the pythons in your path. Perhaps one of them is that the server is running.

+2


a source







All Articles