Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install mod_wsgi as a python into python installation?

I am unable install mod_wsgi on windows, when I am trying to run the following command:

pip install mod_wsgi

It says-

Collecting mod-wsgi
Using cached mod_wsgi-4.4.14.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 20, in <module>
  File "c:\users\aditya\appdata\local\temp\pip-build-ffaywu\mod-wsgi\setup.p
     y", line 139, in <module>
    'missing Apache httpd server packages.' % APXS)
  RuntimeError: The 'apxs' command appears not to be installed or is not 
  executable. Please check the list of prerequisites in the documentation 
  for this package and install any missing Apache httpd server packages.

It is missing the apxs, which is not present in my default apache installation. How do I get this apxs ?? Is there any other way to install apache and then mod_wsgi into python installation?

EDIT - I even tried pip install mod_wsgi-httpd, but it does not work as it says-

Failed to build APR.
like image 838
aditya Avatar asked Oct 03 '15 23:10

aditya


People also ask

Where is mod_wsgi so?

If installing the Apache module by hand, the file is called 'mod_wsgi.so'. The compiled Apache module can be found in the “. libs” subdirectory. The name of the file should be kept the same when copied into its appropriate location.

What is Apache mod_wsgi?

mod_wsgi is an Apache HTTP Server module by Graham Dumpleton that provides a WSGI compliant interface for hosting Python based web applications under Apache. As of version 4.5.


1 Answers

It is because you cannot use the pip installable mod_wsgi on Windows. You need to use precompiled binaries as described at:

https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/win32/README.rst

Courtesy: Graham Dumpleton (https://github.com/GrahamDumpleton/mod_wsgi/issues/76)

like image 63
Ponniah Avatar answered Sep 19 '22 23:09

Ponniah