1

I am working with apache 2.4.27, python 3.7 I need to install mod_wsgi. I tried to install it via pip install mod_wsgi

it gives me this error:

    running build_ext
    building 'mod_wsgi.server.mod_wsgi' extension
    creating build\temp.win-amd64-3.6
    creating build\temp.win-amd64-3.6\Release
    creating build\temp.win-amd64-3.6\Release\src
    creating build\temp.win-amd64-3.6\Release\src\server
    cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Ic:\Apache24/include "-Ic:\program files (x86)\microsoft visual studio\shared\python36_64\include" "-Ic:\program files (x86)\microsoft visual studio\shared\python36_64\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win-amd64-3.6\Release\src/server\mod_wsgi.obj
    error: command 'cl.exe' failed: No such file or directory

1 Answer 1

1

You may need to have cl.exe in your PATH.

PATH is an environment variable that tells Windows where to find executable files when you just give it the name. By default it contains locations such as C:\Windows.

You have two options here.

  1. Use the Visual C++ Command Prompt. You can find it in the Start Menu under the Visual Studio folder. This sets up PATH automatically.
  2. Add the folder cl.exe is in to the PATH manually.

The folder you're looking for is generally (visual studio folder)\VC\bin. Instructions can be found in this answer. After this you can use cl.exe from any Command Prompt. Note that you have to restart the Command Prompt after this in order to update the PATH in it.

Sign up to request clarification or add additional context in comments.

2 Comments

if I used the Visual C++ Command Prompt it gives me the same error
can you check your path variable

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.