hnswlib icon indicating copy to clipboard operation
hnswlib copied to clipboard

Error: Microsoft Visual C++ 14.0 or greater is required -- but I have this version already

Open tinltan opened this issue 4 years ago • 4 comments

Hello! I am trying to pip install hnswlib in my Python environment, and I am encountering this error. I am using Anaconda in my Windows 10 pc.

Collecting hnswlib
  Using cached hnswlib-0.5.2.tar.gz (29 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in c:\users\tintan\.conda\envs\env11\lib\site-packages (from hnswlib) (1.21.4)
Building wheels for collected packages: hnswlib
  Building wheel for hnswlib (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\TinTan\.conda\envs\env11\python.exe' 'C:\Users\TinTan\.conda\envs\env11\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\TinTan\AppData\Local\Temp\tmpeolyw6_c'
       cwd: C:\Users\TinTan\AppData\Local\Temp\pip-install-jtobvvoo\hnswlib_cec0aecc6bb04ef9ab8cb77d62e743de
  Complete output (5 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'hnswlib' 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/

My Microsoft Visual C++ version is 2015-2022 x64 14.30.30704. I don't understand why the error still persists... I need hnswlib which is a dependency in the top2vec python package (for NLP) I am using. Thank you in advance! :)

tinltan avatar Dec 16 '21 00:12 tinltan

Hi @tinltan, I've just tried on a fresh windows with build tools and cannot reproduce it. It might be an environment issue, I'd check that cl is working.

yurymalkov avatar Dec 18 '21 03:12 yurymalkov

Hi @tinltan, I've just tried on a fresh windows with build tools and cannot reproduce it. It might be an environment issue, I'd check that cl is working.

I was able to make it work, too, in a new environment! :D Thank you so much for the affirmation. I was able to run the package I needed (top2vec).

tinltan avatar Dec 21 '21 13:12 tinltan

what's cl? Can you tell me more detail? I have no idea of cl

lidianxiang avatar Mar 24 '22 06:03 lidianxiang

hi @tinltan I have the same problem Plase can you explain more how you solved yours?

samar-smida avatar Apr 15 '22 14:04 samar-smida