I try to install mod_wsgi for windows I install the diferentes requirements about C and C++, and this other stuff, about Visual Studio etc..
But I got this error:
ERROR: Command errored out with exit status 1:
command:
'Z:\PROGRAMACION\6_BACKEND\envpy\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize;
sys.argv[0] = '"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-req-build-jdxut7hw\\setup.py'"'"';
__file__='"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-req-build-jdxut7hw\\setup.py'"'"';
f=getattr(tokenize, '"'"'open'"'"', open)(__file__);
code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();
exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-wheel-7xzm29_v'
cwd: C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-req-build-jdxut7hw\
Complete output (31 lines):
running bdist_wheel
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\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\Apache24/include -IZ:\PROGRAMACION\6_BACKEND\envpy\include -Ic:\users\andres\appdata\local\programs\python\python38\include -Ic:\users\andres\appdata\local\programs\python\python38\include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include" "
-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win-amd64-3.8\Release\src/server\mod_wsgi.obj
mod_wsgi.c
C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-req-build-jdxut7hw\src\server\wsgi_apache.h(39):
fatal error C1083: No se puede abrir el archivo incluir: 'ws2tcpip.h': No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for mod-wsgi
Running setup.py clean for mod-wsgi
Failed to build mod-wsgi
Installing collected packages: mod-wsgi
Running setup.py install for mod-wsgi ... error
ERROR: Command errored out with exit status 1:
command: 'Z:\PROGRAMACION\6_BACKEND\envpy\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-req-build-jdxut7hw\\setup.py'"'"'; __file__='"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-req-build-jdxut7hw\\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\Public\Documents\Wondershare\CreatorTemp\pip-record-10zpln53\install-record.txt' --single-version-externally-managed --compile --install-headers 'Z:\PROGRAMACION\6_BACKEND\envpy\include\site\python3.8\mod-wsgi'
cwd: C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-req-build-jdxut7hw\
Complete output (31 lines):
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\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\Apache24/include -IZ:\PROGRAMACION\6_BACKEND\envpy\include -Ic:\users\andres\appdata\local\programs\python\python38\include -Ic:\users\andres\appdata\local\programs\python\python38\include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include"
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win-amd64-3.8\Release\src/server\mod_wsgi.obj
mod_wsgi.c
C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-req-build-jdxut7hw\src\server\wsgi_apache.h(39): fatal error C1083: No se puede abrir el archivo incluir: 'ws2tcpip.h': No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'Z:\PROGRAMACION\6_BACKEND\envpy\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-req-build-jdxut7hw\\setup.py'"'"';
__file__='"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-req-build-jdxut7hw\\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\Public\Documents\Wondershare\CreatorTemp\pip-record-10zpln53\install-record.txt' --single-version-externally-managed --compile --install-headers 'Z:\PROGRAMACION\6_BACKEND\envpy\include\site\python3.8\mod-wsgi' Check the logs for full command output.
My Specific error:
fatal error C1083: Cannot open file include: 'ws2tcpip.h': No such file or directory
'ws2tcpip.h'
my file is diferent
I See:
Testing installation of mod_wsgi on Windows. for the Graham Dumpleton the creator of this module.
I search here And I got Similar errors but diferentes library
for example Error atemp install connector of MySQL: fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
But In diferents answere in stack overflow sugest that you can donwload a file with extension whl
then I went at this page Unofficial Windows Binaries for Python Extension Packages and I dowload mod_wsgi-4.9.0-cp38-cp38-win_amd64.whl
I then I put this strange file in folder of virtual enviroment site-packages
Then I try with the virtual env activate:
pip install "$ .\envpy\Lib\site-packages\mod_wsgi-4.9.0-cp38-cp38-win_amd64.whl"
In my case the full path is:
pip install "Z:\PROGRAMACION\6_BACKEND\envpy\Lib\site-packages\mod_wsgi-4.9.0-cp38-cp38-win_amd64.whl"
And the installation was well. The output in the cmd
was the installation was well and If I entry in
cd Z:\PROGRAMACION\6_BACKEND\envpy\Lib\site-packages\
I can see the folder \mod_wsgi\
but I am no sure if this installation will be funtional. I don't know if the installation with pip, instal other stuff, other files for example in apache folder like apache\include
or in apache\modules
Y see this blog too Error C1083 al compilar extensiones con Visual Studio 2015
But I don't know in which part of the script setup.py
I needed to changue