本文介绍了pip install mod_wsgi,如何设置MOD_WSGI_APACHE_ROOTDIR环境?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在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:\Apache24C:\Apache22C:\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环境?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 11:14