how to install channels redis in django using pip without errors - python

I am trying to install channels redis module using pip but so far am still getting errors.
I installed Microsoft c++ build tools as the error suggested but so far the error still persists when it comes to building wheel for hiredis.
Here is the output error.
error: subprocess-exited-with-error
× Running setup.py install for hiredis did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
C:\Users\Teacher-5F84DF\AppData\Local\Temp\pip-install-cs726k2z\hiredis_fa16ee7f0b4e4df28a1a34d9640a827d\setup.py:7: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
import sys, imp, os, glob, io
c:\users\teacher-5f84df\appdata\local\programs\python\python310\lib\site-packages\setuptools\dist.py:697: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\hiredis
copying hiredis\version.py -> build\lib.win-amd64-3.10\hiredis
copying hiredis\__init__.py -> build\lib.win-amd64-3.10\hiredis
copying hiredis\hiredis.pyi -> build\lib.win-amd64-3.10\hiredis
copying hiredis\py.typed -> build\lib.win-amd64-3.10\hiredis
running build_ext
building 'hiredis.hiredis' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\src
creating build\temp.win-amd64-3.10\Release\vendor
creating build\temp.win-amd64-3.10\Release\vendor\hiredis
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ivendor -Ic:\users\teacher-5f84df\appdata\local\programs\python\python310\include -Ic:\users\teacher-5f84df\appdata\local\programs\python\python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include /Tcsrc\hiredis.c /Fobuild\temp.win-amd64-3.10\Release\src\hiredis.obj
hiredis.c
c:\users\teacher-5f84df\appdata\local\programs\python\python310\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> hiredis
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Please assist.Thank you

Related

Trying to install Yt-Dlp module but having problems with Brotli installation step

I'm trying to install the Yt-Dlp module for Python 3.11 but for some reason I get this error
Building wheels for collected packages: brotli
Building wheel for brotli (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
C:\Users\igor\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'build-base' will not be supported in future versions. Please use the underscore name 'build_base' instead
warnings.warn(
running bdist_wheel
running build
running build_py
creating bin
creating bin\lib.win-amd64-cpython-311
copying python\brotli.py -> bin\lib.win-amd64-cpython-311
running build_ext
building '_brotli' extension
creating bin\temp.win-amd64-cpython-311
creating bin\temp.win-amd64-cpython-311\Release
creating bin\temp.win-amd64-cpython-311\Release\c
creating bin\temp.win-amd64-cpython-311\Release\c\common
creating bin\temp.win-amd64-cpython-311\Release\c\dec
creating bin\temp.win-amd64-cpython-311\Release\c\enc
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic/include -IC:\Users\igor\AppData\Local\Programs\Python\Python311\include -IC:\Users\igor\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" /Tcc/common/constants.c /Fobin\temp.win-amd64-cpython-311\Release\c/common/constants.obj
constants.c
C:\Users\igor\AppData\Local\Temp\pip-install-cplthpdp\brotli_bec0f5da12d0434ea2253cdadf0efb64\c\common\./platform.h(26): fatal error C1083: NÆo ‚ poss¡vel abrir arquivo incluir: 'string.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for brotli
Running setup.py clean for brotli
Failed to build brotli
Installing collected packages: brotli, websockets, yt-dlp
Running setup.py install for brotli ... error
error: subprocess-exited-with-error
× Running setup.py install for brotli did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
C:\Users\igor\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'build-base' will not be supported in future versions. Please use the underscore name 'build_base' instead
warnings.warn(
running install
C:\Users\igor\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating bin
creating bin\lib.win-amd64-cpython-311
copying python\brotli.py -> bin\lib.win-amd64-cpython-311
running build_ext
building '_brotli' extension
creating bin\temp.win-amd64-cpython-311
creating bin\temp.win-amd64-cpython-311\Release
creating bin\temp.win-amd64-cpython-311\Release\c
creating bin\temp.win-amd64-cpython-311\Release\c\common
creating bin\temp.win-amd64-cpython-311\Release\c\dec
creating bin\temp.win-amd64-cpython-311\Release\c\enc
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic/include -IC:\Users\igor\AppData\Local\Programs\Python\Python311\include -IC:\Users\igor\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" /Tcc/common/constants.c /Fobin\temp.win-amd64-cpython-311\Release\c/common/constants.obj
constants.c
C:\Users\igor\AppData\Local\Temp\pip-install-cplthpdp\brotli_bec0f5da12d0434ea2253cdadf0efb64\c\common\./platform.h(26): fatal error C1083: NÆo ‚ poss¡vel abrir arquivo incluir: 'string.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
I have already tried uninstalling and reinstalling the C++ Build Tools, resetting the PC, installing the Brotli package by itself but it still gives me this error, and not only I have no idea why, I cannot even comprehend error message. Can anyone help me?

can't install pyaudio python and PyCharm

When I'm trying tutorial from internet I got this
Microsoft Windows [Version 10.0.22000.739]
(c) Microsoft Corporation. All rights reserved.
C:\Users\User>pip3 install PyAudio-0.2.11-cp310-cp310-win_amd64.whl
Defaulting to user installation because normal site-packages is not writeable
WARNING: Requirement 'PyAudio-0.2.11-cp310-cp310-win_amd64.whl' looks like a filename, but the file does not exist
Processing c:\users\user\pyaudio-0.2.11-cp310-cp310-win_amd64.whl
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\User\\PyAudio-0.2.11-cp310-cp310-win_amd64.whl'
C:\Users\User>pip3 install pyaudio
Defaulting to user installation because normal site-packages is not writeable
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
copying src\pyaudio.py -> build\lib.win-amd64-3.10
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\src
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -IC:\Program Files\Python310\include -IC:\Program Files\Python310\Include /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.10\Release\src/_portaudiomodule.obj
error: command 'cl.exe' failed: None
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyaudio
Running setup.py clean for pyaudio
Failed to build pyaudio
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
error: subprocess-exited-with-error
× Running setup.py install for pyaudio did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
copying src\pyaudio.py -> build\lib.win-amd64-3.10
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\src
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -IC:\Program Files\Python310\include -IC:\Program Files\Python310\Include /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.10\Release\src/_portaudiomodule.obj
error: command 'cl.exe' failed: None
[end of output]

cannot install annoy wheel

I have been trying to install the python package annoy but it always gives an error, I have tried different methods but they don't work.
I have even tried to install the module manually but it does not work either
My Code:
pip install annoy
Error:
Collecting annoy
Using cached annoy-1.17.0.tar.gz (646 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: annoy
Building wheel for annoy (setup.py): started
Building wheel for annoy (setup.py): finished with status 'error'
Running setup.py clean for annoy
Failed to build annoy
Installing collected packages: annoy
Running setup.py install for annoy: started
Running setup.py install for annoy: finished with status 'error'
error: subprocess-exited-with-error
python setup.py bdist_wheel did not run successfully.
exit code: 1
[18 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\annoy
copying annoy\__init__.py -> build\lib.win-amd64-3.10\annoy
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'annoy.annoylib' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Tainu\AppData\Local\Programs\Python\Python310\include -IC:\Users\Tainu\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um /EHsc /Tpsrc/annoymodule.cc /Fobuild\temp.win-amd64-3.10\Release\src/annoymodule.obj -D_CRT_SECURE_NO_WARNINGS -DANNOYLIB_MULTITHREADED_BUILD
annoymodule.cc
C:\Users\Tainu\AppData\Local\Temp\pip-install-3by5ea7a\annoy_d20fa133de45438cb5f39d6b5b50b96b\src\annoylib.h(19): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for annoy
error: subprocess-exited-with-error
Running setup.py install for annoy did not run successfully.
exit code: 1
[18 lines of output]
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\annoy
copying annoy\__init__.py -> build\lib.win-amd64-3.10\annoy
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'annoy.annoylib' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Tainu\AppData\Local\Programs\Python\Python310\include -IC:\Users\Tainu\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um /EHsc /Tpsrc/annoymodule.cc /Fobuild\temp.win-amd64-3.10\Release\src/annoymodule.obj -D_CRT_SECURE_NO_WARNINGS -DANNOYLIB_MULTITHREADED_BUILD
annoymodule.cc
C:\Users\Tainu\AppData\Local\Temp\pip-install-3by5ea7a\annoy_d20fa133de45438cb5f39d6b5b50b96b\src\annoylib.h(19): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
Encountered error while trying to install package.
annoy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
My python version is 3.10, Windows 11 64-bit
I am using Pycharm
any help would be welcome
Below command worked in my case.
pipwin install annoy
Try installing with conda.
A lot of libraries that require C/C++ code to be compiled as part of their build and installation can be finicky on windows machines.
https://anaconda.org/conda-forge/python-annoy
This article might help too
https://www.programmersought.com/article/95834605670/

Cannot open include file: 'io.h': No such file or directory, Python 3.7.5, Windows 8.1, VS v 2019

I am trying to install the Isotree package from pip install, when I receive the error below. I am using Python 3.7, working on a Windows 8 with installed C++ build tools using Visual studio build tools 2019 (version 16.7.5). I have also included Windows 10 SDK (10.0.18362.0) along with other add-ons.
I have tried all possible solutions I found to similar problems on this website and via other google searches, but I can't seem to get it working. Since I am working on a work laptop, I cannot go around and download from another party.
Can somebody help me how to resolve this problem? I tried setting an environment variable INCLUDE, pointing to the folder [C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt]
this helped but another error occurred, "cannot open include: basetsd.h" and then trying to solve that, the original error (io.h) came back.
Building wheel for isotree (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\a481838\appdata\local\programs\python\python37\python.exe'
'c:\users\a481838\appdata\local\programs\python\python37\lib\site-packages\pip\
_vendor\pep517\_in_process.py' build_wheel 'C:\Users\A481838\AppData\Local\Temp\
tmpslnm97j9'
cwd: C:\Users\A481838\AppData\Local\Temp\pip-install-uxt3l0k4\isotree
Complete output (28 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\isotree
copying isotree\__init__.py -> build\lib.win-amd64-3.7\isotree
running build_ext
cythoning isotree/cpp_interface.pyx to isotree\cpp_interface.cpp
building 'isotree._cpp_interface' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\isotree
creating build\temp.win-amd64-3.7\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\1
4.27.29110\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D_USE_MER
SENNE_TWISTER -D_ENABLE_CEREAL -IC:\Users\A481838\AppData\Local\Temp\pip-build-e
nv-7aj7e0rh\overlay\Lib\site-packages\numpy\core\include -I. -I./src -IC:\Users\
A481838\AppData\Local\Temp\pip-build-env-7aj7e0rh\overlay\include -Ic:\users\a48
1838\appdata\local\programs\python\python37\include -Ic:\users\a481838\appdata\l
ocal\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (
x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\include"
"-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt" /EHsc /Tpis
otree\cpp_interface.cpp /Fobuild\temp.win-amd64-3.7\Release\isotree\cpp_interfac
e.obj /openmp /O2 /std:c++14
cpp_interface.cpp
c:\users\a481838\appdata\local\programs\python\python37\include\pyconfig.h(59)
: fatal error C1083: Cannot open include file: 'io.h': No such file or directory
c:\users\a481838\appdata\local\programs\python\python37\lib\distutils\extensio
n.py:131: UserWarning: Unknown Extension options: 'install_requires'
warnings.warn(msg)
C:\Users\A481838\AppData\Local\Temp\pip-build-env-7aj7e0rh\overlay\Lib\site-pa
ckages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_le
vel' not set, using 2 for now (Py2). This will change in a later release! File:
C:\Users\A481838\AppData\Local\Temp\pip-install-uxt3l0k4\isotree\isotree\cpp_int
erface.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
warning: isotree\cpp_interface.pyx:384:44: Not all members given for struct 'I
soForest'
warning: isotree\cpp_interface.pyx:384:44: Not all members given for struct 'I
soForest'
warning: isotree\cpp_interface.pyx:387:47: Not all members given for struct 'E
xtIsoForest'
warning: isotree\cpp_interface.pyx:387:47: Not all members given for struct 'E
xtIsoForest'
warning: isotree\cpp_interface.pyx:391:34: Not all members given for struct 'I
mputer'
warning: isotree\cpp_interface.pyx:391:34: Not all members given for struct 'I
mputer'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildT
ools\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX86\\x64\\cl.exe' failed with exit
status 2
----------------------------------------
ERROR: Failed building wheel for isotree
Failed to build isotree
ERROR: Could not build wheels for isotree which use PEP 517 and cannot be instal
led directly```
Type the following.
pip install pipwin
pipwin install pycuda

Can't build mod_wsgi on Windows 10 - "Cannot open include file: 'ws2tcpip.h'" - Have VS 2019 Build tools

I have apache 2.4 installed (64 bit), python 3.7 (64 bit) (installed from Anaconda, if that matters) and VS 2019 C++ build tools, with the SDK and everything else required to build this checked. I still cannot build mod_wsgi with pip install. How can I get this to work on Windows 10?
I have tried uninstalling and reinstalling, python, visual studio & visual studio build tools, and apache. I have tried all the various visual studio command prompts. I have checked stack overflow, github, and other sites. There were others with similar issues but the solution of installing build tools did not work for me because a.) I already had it, b.) I reinstalled everything and it still didn't work.
pip install mod_wsgi
Resulting error message:
Collecting mod_wsgi
Using cached https://files.pythonhosted.org/packages/26/03/a3ed5abc2e66c82c40b0735c2f819c898d136879b00be4f5537126b6a4a4/mod_wsgi-4.6.7.tar.gz
Building wheels for collected packages: mod-wsgi
Building wheel for mod-wsgi (setup.py) ... error
ERROR: Complete output from command 'C:\Users\VC046230\AppData\Local\Continuum\anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\VC046230\\AppData\\Local\\Temp\\pip-install-12r9v42f\\mod-wsgi\\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\VC046230\AppData\Local\Temp\pip-wheel-1q_bver8' --python-tag cp37:
ERROR: C:\Users\VC046230\AppData\Local\Continuum\anaconda3\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\mod_wsgi
copying src\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi
creating build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\apxs_config.py -> build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\environ.py -> build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server
creating build\lib.win-amd64-3.7\mod_wsgi\server\management
copying src\server\management\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management
creating build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
copying src\server\management\commands\runmodwsgi.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
copying src\server\management\commands\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
creating build\lib.win-amd64-3.7\mod_wsgi\docs
copying docs\_build\html\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\docs
creating build\lib.win-amd64-3.7\mod_wsgi\images
copying images\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\images
copying images\snake-whiskey.jpg -> build\lib.win-amd64-3.7\mod_wsgi\images
running build_ext
building 'mod_wsgi.server.mod_wsgi' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
creating build\temp.win-amd64-3.7\Release\src\server
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.23.28105\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Ic:\Apache24/include -IC:\Users\VC046230\AppData\Local\Continuum\anaconda3\include -IC:\Users\VC046230\AppData\Local\Continuum\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.23.28105\include" /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win-amd64-3.7\Release\src/server\mod_wsgi.obj
mod_wsgi.c
C:\Users\VC046230\AppData\Local\Temp\pip-install-12r9v42f\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\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for mod-wsgi
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 or directory'.
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 exit status 1158
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!
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)

Categories

Resources