将 mod_python 从使用 python2.4 切换到 python2.5
我的目标是让 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 似乎安装到与 Python 2.4 不同的目录:
Python2.5.5 /usr/local/lib/python2.5
Python2.4 /usr /lib/python2.4/
有没有办法更新mod_python以使用Python2.5.5?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不。而是根据 2.5.5 重建它。
No. Rebuild it against 2.5.5 instead.