0

I'm facing an issue while attempting to install the "hnswlib" package in Python using the following command:

pip install hnswlib

I got the error below:

enter image description here

I understand that the error is due to the absence of a C++ compiler, prompting a suggestion to acquire the "Microsoft C++ Build Tools.". The issue lies in the fact that installing "Microsoft C++ Build Tools" needs admin rights to be installed on my work PC.

However, I've discovered an alternative solution "MinGW-w64". I've Successfully installed this toolchain on my system, I've received messages confirming its installation and recognition:

enter image description here

Despite having "MinGW-w64" in place, the error persists when installing "hnswlib."

Any assistance on integrating "MinGW" or any other alternative (Maybe a portable version of "Microsoft C++ Build Tools" or a version that doesn't require admin rights) would be greatly appreciated.

Thanks in advance.

AnonX
  • 167
  • 8
  • 1
    it has to be the ms build tools as it needs to match the compiler python was built with. If you want to use an alternative compiler you'll need to compile python from source – Alan Birtles Aug 25 '23 at 18:43
  • msys2 has python support but you need to use the python from msys2 and not one that was compiled for msvc – drescherjm Aug 25 '23 at 18:47
  • If this is your work PC, it is also possible that you need a license for the MS Tools. For my work PC I would order the installation from the administration, and they would push out the install. (And there is no "portable free version". I think the admin rights are required to configure debug permissions). – BoP Aug 25 '23 at 18:47

0 Answers0