Can't Build Mod_wsgi On Windows 10 - "cannot Open Include File: 'ws2tcpip.h'" - Have Vs 2019 Build Tools
Solution 1:
I just solved the same problem. My config is Windows 10, Python 3.8.1, Apache2.4.39-Win64-VC15-OpenSSL1.1.1b, mod-wsgi 4.7.1.
1) I installed using Build Tools
- Visual Studio Build Tools Main Components
- SDK for Windows 10 (10.0.18362.0) since I'm using Windows 10
- MSVC 140 - C++ VS 2015 (v.14.00)
2) Then I added C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin to PATH
3) Then I got the next error:
'apr_perms_set.h': No such file ordirectory'.
I downloaded the file and put it into $APACHE_DIR\include
4) Then I got third error:
fatal error LNK1158: cannot run ‘rc.exe’.
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exitstatus1158
I took following files rc.exe rcdll.dll
from C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x86 and paste them into C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
5) Congratulations!
Solution 2:
To anyone who had this issue, the following github issue helped me resolve it: https://github.com/GrahamDumpleton/mod_wsgi/issues/194
I had already installed Visual C++ Redistributable, so I was confused why pip install mod_wsgi still was not working.
All I ended up having to do was install Windows 10 SDK from https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/
(might also need 8.1 if it still does not work)
Post a Comment for "Can't Build Mod_wsgi On Windows 10 - "cannot Open Include File: 'ws2tcpip.h'" - Have Vs 2019 Build Tools"