How can I solved this mod-wsgi installation error on windows 10?

1,534 views
Skip to first unread message

Cristhian Heredia Claure

unread,
Apr 29, 2020, 7:39:37 PM4/29/20
to modwsgi

helloo everyone.

I have little knowledge in the area and I was starting a small project in Django, for which I wanted to use with the Apache web server, but unfortunately when I was installing the mod-wsgi module, I got a big error that I can't find a solution, I would ask for your great help to solve it, here is the installation error.

Thank you very much in advance.



C:\WINDOWS\system32>pip install mod-wsgi
Collecting mod-wsgi
  Using cached mod_wsgi-4.7.1.tar.gz (498 kB)
Installing collected packages: mod-wsgi
    Running setup.py install for mod-wsgi ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\cristhian\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Cristhian\\AppData\\Local\\Temp\\pip-install-jqoqwn8k\\mod-wsgi\\setup.py'"'"'; __file__='"'"'C:\\Users\\Cristhian\\AppData\\Local\\Temp\\pip-install-jqoqwn8k\\mod-wsgi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Cristhian\AppData\Local\Temp\pip-record-icqhylb3\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\cristhian\appdata\local\programs\python\python38\Include\mod-wsgi'
         cwd: C:\Users\Cristhian\AppData\Local\Temp\pip-install-jqoqwn8k\mod-wsgi\
    Complete output (33 lines):
    c:\users\cristhian\appdata\local\programs\python\python38\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\mod_wsgi
    copying src\__init__.py -> build\lib.win-amd64-3.8\mod_wsgi
    creating build\lib.win-amd64-3.8\mod_wsgi\server
    copying src\server\apxs_config.py -> build\lib.win-amd64-3.8\mod_wsgi\server
    copying src\server\environ.py -> build\lib.win-amd64-3.8\mod_wsgi\server
    copying src\server\__init__.py -> build\lib.win-amd64-3.8\mod_wsgi\server
    creating build\lib.win-amd64-3.8\mod_wsgi\server\management
    copying src\server\management\__init__.py -> build\lib.win-amd64-3.8\mod_wsgi\server\management
    creating build\lib.win-amd64-3.8\mod_wsgi\server\management\commands
    copying src\server\management\commands\runmodwsgi.py -> build\lib.win-amd64-3.8\mod_wsgi\server\management\commands
    copying src\server\management\commands\__init__.py -> build\lib.win-amd64-3.8\mod_wsgi\server\management\commands
    creating build\lib.win-amd64-3.8\mod_wsgi\docs
    copying docs\_build\html\__init__.py -> build\lib.win-amd64-3.8\mod_wsgi\docs
    creating build\lib.win-amd64-3.8\mod_wsgi\images
    copying images\__init__.py -> build\lib.win-amd64-3.8\mod_wsgi\images
    copying images\snake-whiskey.jpg -> build\lib.win-amd64-3.8\mod_wsgi\images
    running build_ext
    building 'mod_wsgi.server.mod_wsgi' extension
    creating build\temp.win-amd64-3.8
    creating build\temp.win-amd64-3.8\Release
    creating build\temp.win-amd64-3.8\Release\src
    creating build\temp.win-amd64-3.8\Release\src\server
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:/AppServ/Apache24/include -Ic:\users\cristhian\appdata\local\programs\python\python38\include -Ic:\users\cristhian\appdata\local\programs\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win-amd64-3.8\Release\src/server\mod_wsgi.obj
    mod_wsgi.c
    C:\Users\Cristhian\AppData\Local\Temp\pip-install-jqoqwn8k\mod-wsgi\src\server\wsgi_apache.h(42): fatal error C1083: No se puede abrir el archivo incluir: 'httpd.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\cristhian\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Cristhian\\AppData\\Local\\Temp\\pip-install-jqoqwn8k\\mod-wsgi\\setup.py'"'"'; __file__='"'"'C:\\Users\\Cristhian\\AppData\\Local\\Temp\\pip-install-jqoqwn8k\\mod-wsgi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Cristhian\AppData\Local\Temp\pip-record-icqhylb3\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\cristhian\appdata\local\programs\python\python38\Include\mod-wsgi' Check the logs for full command output.



Graham Dumpleton

unread,
Apr 29, 2020, 7:41:45 PM4/29/20
to mod...@googlegroups.com
In the directory:

C:/AppServ/Apache24/include

is there a httpd.h file?

If not, you are giving the wrong location of the Apache installation, or you are using an Apache installation which is missing the bits to allow you to build additional Apache modules.

It is recommended to use ApacheLounge distribution. Various other Apache distributions cannot be used for various reasons.

Graham

--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/8da3302f-1ba5-4d08-9fe5-a9f6db3f3228%40googlegroups.com.

Cristhian Heredia Claure

unread,
Apr 29, 2020, 9:14:40 PM4/29/20
to modwsgi
Thanks for the reply.
I looked into my Apache Location and there was not even an "include" directory.
So I download the ApacheLonge, I check the Iclude directory and inside was the "httpd.h file".
And I am not sure if it's ok but I accidentally  "copy paste" into the same directory where are the other "Apache Files" and only the directory "INCLUDE" was copied becasue I assume the other already exist...so I run the Installation command again "pip install mod-wsgi"  and Succesfully installed mod-wsgi!!

In summary, I could solve the installation error thanks to that advice about Include directory and httpd.h file,thank you very much for it!

Now I wonder if that copying action would affect something in a future use of the Apache version which I am using. Anyway I will try to only use APACHELOUNGE.




El miércoles, 29 de abril de 2020, 19:41:45 (UTC-4), Graham Dumpleton escribió:
In the directory:

C:/AppServ/Apache24/include

is there a httpd.h file?

If not, you are giving the wrong location of the Apache installation, or you are using an Apache installation which is missing the bits to allow you to build additional Apache modules.

It is recommended to use ApacheLounge distribution. Various other Apache distributions cannot be used for various reasons.

Graham

To unsubscribe from this group and stop receiving emails from it, send an email to mod...@googlegroups.com.

Graham Dumpleton

unread,
Apr 29, 2020, 9:17:02 PM4/29/20
to mod...@googlegroups.com
You shouldn't go copying header files from one Apache distribution to another if that is what you have done, as they may not be for a compatible version. You should use the ApacheLounge distribution in its entirety and run it instead.

What Apache distribution are you using?

To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/1008bdd2-c327-4211-ba6d-4da6ab62996c%40googlegroups.com.

Cristhian Heredia Claure

unread,
Apr 29, 2020, 9:25:43 PM4/29/20
to modwsgi
I am currently using "Apache Web Server Version 2.4.25" which I downloaded withing "The AppServ Open Project - 8.6.0 for Windows".


El miércoles, 29 de abril de 2020, 21:17:02 (UTC-4), Graham Dumpleton escribió:
You shouldn't go copying header files from one Apache distribution to another if that is what you have done, as they may not be for a compatible version. You should use the ApacheLounge distribution in its entirety and run it instead.

What Apache distribution are you using?
Reply all
Reply to author
Forward
0 new messages