mod_wsgi icon indicating copy to clipboard operation
mod_wsgi copied to clipboard

Getting an error installing

Open bkenne opened this issue 9 months ago • 2 comments

I am getting an error message when attempting to install. Is there any advice you can offer? I am installing to Python 3.12.6.

C:\ms4w>pip install --no-cache-dir mod_wsgi Collecting mod_wsgi Downloading mod_wsgi-5.0.2.tar.gz (498 kB) Preparing metadata (setup.py) ... done Building wheels for collected packages: mod_wsgi Building wheel for mod_wsgi (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [24 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win32-cpython-312 creating build\lib.win32-cpython-312\mod_wsgi copying src_init_.py -> build\lib.win32-cpython-312\mod_wsgi creating build\lib.win32-cpython-312\mod_wsgi\server copying src\server\apxs_config.py -> build\lib.win32-cpython-312\mod_wsgi\server copying src\server\environ.py -> build\lib.win32-cpython-312\mod_wsgi\server copying src\server_init_.py -> build\lib.win32-cpython-312\mod_wsgi\server creating build\lib.win32-cpython-312\mod_wsgi\server\management copying src\server\management_init_.py -> build\lib.win32-cpython-312\mod_wsgi\server\management creating build\lib.win32-cpython-312\mod_wsgi\server\management\commands copying src\server\management\commands\runmodwsgi.py -> build\lib.win32-cpython-312\mod_wsgi\server\management\commands copying src\server\management\commands_init_.py -> build\lib.win32-cpython-312\mod_wsgi\server\management\commands creating build\lib.win32-cpython-312\mod_wsgi\docs copying docs_build\html_init_.py -> build\lib.win32-cpython-312\mod_wsgi\docs creating build\lib.win32-cpython-312\mod_wsgi\images copying images_init_.py -> build\lib.win32-cpython-312\mod_wsgi\images copying images\snake-whiskey.jpg -> build\lib.win32-cpython-312\mod_wsgi\images running build_ext building 'mod_wsgi.server.mod_wsgi' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for mod_wsgi Running setup.py clean for mod_wsgi Failed to build mod_wsgi ERROR: Failed to build installable wheels for some pyproject.toml based projects (mod_wsgi)

Looking forward to your guidance.

Sincerely, Bryon

bkenne avatar Mar 12 '25 19:03 bkenne

As the error says:

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

So do you have the Microsoft compiler environment installed and is it available within the user terminal environment for the user that you tried to do the build from?

If you believe it is, then try running command as:

pip install --no-cache-dir -vvv mod_wsgi

to get more verbose logging to get a better indication of the underlying error.

GrahamDumpleton avatar Mar 12 '25 19:03 GrahamDumpleton

Thank you so much. I will further investigate and let you know how it goes!

bkenne avatar Mar 12 '25 20:03 bkenne