我的目标是让Apache处理一个python脚本并输出到请求客户机。
我的服务器同时安装了python2.4和python2.5.5。我已经将Apache配置为正确处理python脚本,并用一个简单的测试脚本进行测试。但是,我尝试运行的真正脚本需要python2.5.5。mod_python似乎在使用python2.4。
当我请求文件时,将获得以下pythondebug输出:
Mod_python error: "PythonHandler output.py"
...
AssertionError: Please use Python 2.5 or greater
其他信息:
从命令行检查python版本:
python -V
收益率
Python 2.5.5
Apache错误日志显示以下错误类型:
[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似乎安装在与python2.4不同的目录中:
Python 2.5.5
/usr/local/lib/python2.5
Python 2.4
/usr/lib/python2.4/
有没有办法更新mod_python以使用python2.5.5?