我正在尝试设置WAMP服务器。我已经让Apache正常工作了,而且我已经毫无障碍地安装了mod_wsgi。
问题是,我的项目使用虚拟环境(使用virtualenv)。很明显,mod_wsgi在定位我的Django安装时遇到了问题。
我在试着理解如何让mod_wsgi和virtualenvs一起工作。文档似乎认为这是不可能的:
Note that the WSGIPythonHome directive can only be used on UNIX systems and is not available on Windows systems. This is because on Windows systems the location of the Python DLL seems to be what dictates where Python will look for the Python library files. It is not known at this point how one could create a distinct baseline environment independent of the main Python installation on Windows.
从这里开始:mod_wsgi + virtualenv docs。
有人知道怎么做吗?
您可以通过Python以编程方式激活环境,在导入任何其他内容之前将其添加到.wsgi文件中。
来自virtualenv's docs:
相关问题 更多 >
编程相关推荐