开发者

Switching mod_python from using python2.4 to python2.5

开发者 https://www.devze.com 2022-12-21 08:01 出处:网络
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 scr

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?


No. Rebuild it against 2.5.5 instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号