问题描述
我正在尝试在Windows 10中安装mod_wsgi.
命令pip install mod_wsgi
给我错误
RuntimeError: No Apache installation can be found. Set the MOD_WSGI_APACHE_ROOTDIR environment to its location.
我的Apache目录是F:\Apache24\
.
我的问题是,如何设置MOD_WSGI_APACHE_ROOTDIR环境?
谢谢,桑巴夫(Sambhav)
请参阅 http://modwsgi.readthedocs.io/en/develop/release-notes/version-4.5.12.html 应该会为您提供帮助.
简而言之:
默认情况下,安装会在C:\Apache24
,C:\Apache22
和C:\Apache2
中查找Apache,因为您的安装都不是其中之一,因此您需要将环境变量MOD_WSGI_APACHE_ROOTDIR
设置为安装路径. /p>
在系统上,您可以通过在命令提示符下运行以下命令来完成此操作:
set "MOD_WSGI_APACHE_ROOTDIR=F:\Apache24"
设置变量,然后您可以运行pip命令(在同一命令提示符下):
pip install mod_wsgi
要了解有关set
命令的更多信息,请在命令提示符下运行set /?
.
I am trying to install mod_wsgi in Windows 10.
The command pip install mod_wsgi
is giving me error,
RuntimeError: No Apache installation can be found. Set the MOD_WSGI_APACHE_ROOTDIR environment to its location.
My Apache dir is F:\Apache24\
.
My question is, how to setup MOD_WSGI_APACHE_ROOTDIR environment ?
Thanks,Sambhav
Referring to the docs at http://modwsgi.readthedocs.io/en/develop/release-notes/version-4.5.12.html should help you.
In Short:
By default the installation looks for Apache in C:\Apache24
, C:\Apache22
and C:\Apache2
, as your installation is none of these you need to set the environment variable MOD_WSGI_APACHE_ROOTDIR
to the path you have installed it to.
On your system you would do this by running this in your command prompt:
set "MOD_WSGI_APACHE_ROOTDIR=F:\Apache24"
Which sets the variable, and then you can run the pip command (in the same command prompt):
pip install mod_wsgi
To read more about the set
command run set /?
in command prompt.
这篇关于pip install mod_wsgi,如何设置MOD_WSGI_APACHE_ROOTDIR环境?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!