Install Python Package with *portable* Microsoft C++ Build Tools

23 hours ago 3
ARTICLE AD BOX

I would like to install a Python package on Windows that requires compilation. The package maintainers have only published the source code and there are no prebuilt wheel files. When trying to pip install the package I see the 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/ of which there are many questions about on this forum.

I believe I already have obtained the required build tools using the portable-msvc.py script here: https://gist.github.com/mmozeiko/7f3162ec2988e81e56d5c4e22cde9977

I used this script because a) I do not have admin privileges on my machine; and b) to avoid installing gigabytes of other software that (I believe) I do not need. I have already successfully used the tools downloaded by this script to compile C++ code written by a coworker.

How can I use this specific installation of the build tools to build a Python package requiring compilation?

I have tried opening a fresh command prompt, running the setup_x64.bat, and then pip installing, but I get the same error, even though I verified the environment variables are set as expected.

Read Entire Article