scikit-learn-contrib / hdbscan

A high performance implementation of HDBSCAN clustering.
http://hdbscan.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
2.8k stars 502 forks source link

ERROR while installing hdbscan using pip #475

Open LorenzoBuriola opened 3 years ago

LorenzoBuriola commented 3 years ago

I know that on this thing it has been written a lot but...

I am using Windows 10, Python 3.7, with all python packages updated. While running python -m pip install hdbscan an error pops out:

Building wheel for hdbscan (PEP 517) ... error
ERROR: Command errored out with exit status 1:
   ...
  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/

  ERROR: Failed building wheel for hdbscan
Failed to build hdbscan
ERROR: Could not build wheels for hdbscan which use PEP 517 and cannot be installed directly

It requires me to have Microsoft Visual C++ 14.0 or greater, which I have (Microsoft Visual C++ 2015-2019 Redistributable 14.28 which was installed with Visual Studio 2019 Community), but for the sake of completeness I also installed the "Microsoft C++ Build Tools".

Note that using conda installation everything goes fine. What is the problem with pip?

edugmes commented 3 years ago

I succeeded to install it by doing the following things:

Important thing: as I use conda environment, I did steps 2 and 3 inside the target environment and could import HDBSCA in both jupyter notebooks and .py scripts (terminal like).

AbrahamSanders commented 3 years ago

@edugmes Also on windows 10. Strange - for me installing the Microsoft C++ Build Tools and Windows 10 SDK independently didn't work, what ended up working was installing the full "Desktop development with C++" workload in the visual studio installer. Not sure what the delta is between the two installs (clearly the full development workload is bigger) and what the actual missing component that made the difference was.