views:

78

answers:

1

My goal is to have Apache process a python script and output to the requesting client.

My server has both Python2.4 and Python2.5.5 installed. I have Apache configured to correctly process python scripts and tested with a simple test script. However, the real script I am trying to run requires Python2.5.5. Mod_Python seems to be utilizing Python2.4.

I am getting the following PythonDebug output when I request the file:

Mod_python error: "PythonHandler output.py"
...
AssertionError: Please use Python 2.5 or greater

Additional information:

Checking the Python version from the command line:

python -V returns Python 2.5.5

The Apache error log shows the following error type:

[Mon Mar 01 14:04:27 2010] [error] [client xxx.xxx.xxx.xxx] PythonHandler output:   File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 464, in import_module\n    module = imp.load_module(mname, f, p, d)

Python2.5.5 seems to be installed to a different directory than Python 2.4:

Python2.5.5 /usr/local/lib/python2.5

Python2.4 /usr/lib/python2.4/

Is there any way to update mod_python to use Python2.5.5?

A: 

No. Rebuild it against 2.5.5 instead.

Ignacio Vazquez-Abrams
That did it, thank you!
Structure