Closed bzv3 closed 3 months ago
You may need to set an environment variable called "DISTUTILS_USE_SDK" to "1". After doing that, I was able to pip install netifaces
which requires build tools.
For reference, see https://github.com/pypa/setuptools/blob/0156e248e777eebff9250d83603611585d0c8f12/setuptools/msvc.py#L182C9-L182C26
Pip seems to be using vswhere
to try and locate the toolchain, but that program is absent in PortableBuildTools. Unfortunately, detecting Windows development toolchain is a pure heuristic, and everyone does it differently, there is simply no reliable fix to that. You can use a workaround provided by @Donaldduck8 if it works for Pip, but this program is really meant for native Windows development using C/C++ compilers or other systems programming languages like Odin or Jai. Other things can work if this installation really has everything they need, but I would recommend installing the full Visual Studio just to be safe. - Hikari
I am closing this for now.
I have installed PortableBuildTools, ensured that all the relevant paths are on my %PATH% as well as other system environment variables, and rebooted my machine as per the GUI installer instructions.
And pip still cannot build modules that require Microsoft Visual C++ 14.0 or higher.
I have killed/restarted the terminal in VS Code where I am working.
Any further suggestions? Thanks!