简体   繁体   中英

pip install mod_wsgi, How to Set MOD_WSGI_APACHE_ROOTDIR environment?

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.

If pip install mod_wsgi cannot find the apache root dir and asked to set ( MOD_WSGI_APACHE_ROOTDIR ) env variable.

set "MOD_WSGI_APACHE_ROOTDIR=F:\Apache24"

does not work in pycharm terminal (powershell), use below instead (verify path)

$env:MOD_WSGI_APACHE_ROOTDIR = "C:\wamp64\bin\apache\apache2.4.51"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM