我的操作系统已经有 Python 2.6.6,我已经安装了 Python 2.7.3 作为替代。 (Python 工作正常)。我已经安装了mod_python
同样,但是当我尝试在 Apache 服务器上执行 Python 文件时,它会向我显示一个错误列表,我可以看到它正在寻找 Python 2.6.6 库。但我需要使用 python 2.7.3。谁能帮我摆脱它?
其实我不知道Apache是否配置好!
我在 CentOS 6.2 上。
最佳答案
看看this .但是,请注意这部分:
If you want to use a different version of major/minor version of Python than currently used, you must recompile mod_wsgi against the alternate version of Python.
我不太确定如果你只是交换
WSGIPythonHome
变量它将起作用。如果你安装了mod_wsgi
与 yum
,您可能会有 mod_wsgi
对于 Python 2.6.x
,与 CentOS 6.x
一起分发.如果你真的想用Python 2.7.x
,您可能需要构建 mod_wsgi
从源头(实际上并不难)。
关于python - Apache 寻找 Python 2.6 而不是 2.7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14743809/