Cannot open include file: 'ws2tcpip.h': No such file or directory
I'm getting the following error while trying to pip install mod_wsgi
building 'mod_wsgi.server.mod_wsgi' extension
creating build\temp.win32-3.6
creating build\temp.win32-3.6\Release
creating build\temp.win32-3.6\Release\src
creating build\temp.win32-3.6\Release\src\server
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:/xampp/apache/include -Ic:\users\vahid\appdata\local\programs\python\python36-32\include -Ic:\users\vahid\appdata\local\programs\python\python36-32\include /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win32-3.6\Release\src/server\mod_wsgi.obj
mod_wsgi.c
c:\users\vahid\appdata\local\temp\pip-build-t22_ft9k\mod-wsgi\src\server\wsgi_apache.h(39): fatal error C1083: Cannot open include file: 'ws2tcpip.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\users\vahid\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Vahid\\AppData\\Local\\Temp\\pip-build-t22_ft9k\\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\Vahid\AppData\Local\Temp\pip-eo34q14l-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Vahid\AppData\Local\Temp\pip-build-t22_ft9k\mod-wsgi\
System info: Windows 10 x64 Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32 Visual Studio 2017 (I didn't choose the C++ workload during installation)
I resolved that error by installing Visual C++ 2015 Build Tools (along with Windows 8.1 and Windows 10 SDK)
Hi,
I am also facing same error that you found, but i have already installed Visual C++ 2015 Build Tools so how can i fix the this error
c:\users\dhanesh\appdata\local\temp\pip-build-hhato25v\mod-wsgi\src\server\wsgi_apache.h(39): fatal error C1083: Cannot open include file: 'ws2tcpip.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe' failed with exit status 2
@DhaneshKumarHeerani Probably not installed properly or completely. Make sure to check both Windows 8.1 and Windows 10 SDK in the installer.
ok Can you please tell me about this error that i found now while running file.
error: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.).
how can solve this please .>
Read the docs.
That documentation isn't going to help on Windows as you can't use mod_wsgi-express or the mod_wsgi Django integration on Windows.
The question you are having now possibly relates more to Django setup though, so have a look first on StackOverflow site for a solution.