hdbscan icon indicating copy to clipboard operation
hdbscan copied to clipboard

ERROR: Failed building wheel for hdbscan

Open Pablo-GDT opened this issue 4 years ago • 5 comments

When I run the command pip install hdbscan, I get the following error:

RuntimeError: The current Numpy installation ('C:\Users\Pablo GDT\AppData\Local\Temp\pip-build-env-7165tsmr\overlay\Lib\site-packages\numpy\init.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86 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

I have no clue what this means but I've followed threads similar to this where it's suggested to use numpy==1.19.3 which I modified in both my base and venv. I would appreciate any guidance on the issue and thank you in advance!

Pablo-GDT avatar Nov 15 '20 15:11 Pablo-GDT

To add to this, there is a bug with Numpy on Windows right now for which the advised fix it to downgrade numpy to 1.19.3. Unfortunately, that does not fix the issue for hdbscan which seems to be triggering the exception even if the numpy version is correct.

TLDR: As of right now the package cannot be installed on Windows.

EDIT: If you change the pyproject.toml file to set the numpy version you can successfully build hdbscan.

[build-system]
requires = [
  "setuptools",
  "wheel",
  "cython",
  "numpy==1.19.3"
]

As an aside, these dependencies should probably be frozen just like the ones in requirements.txt to avoid this kind of issue.

Belval avatar Dec 05 '20 16:12 Belval

I'm stuck with the same problem -- ERROR: Could not build wheels for hdbscan which use PEP 517 and cannot be installed directly -- but I'm using Linux (Ubuntu 20.04.1), Python 3.8.5


Update: https://github.com/scikit-learn-contrib/hdbscan/issues/293#issuecomment-553263579 fixed the issue for me

hp0404 avatar Jan 05 '21 19:01 hp0404

I ran into this today and Installing Visual C++ 2015 Build Tools fixed it for me.

On windows 10, python 3.8.6

billfreeman44 avatar Jan 19 '21 14:01 billfreeman44

Hi @Belval, When I run the command pip install E:\zy\hdbscan-master, (I need install the latest codes to avoid the memory mapping issues), I get the following error: Building wheels for collected packages: hdbscan Building wheel for hdbscan (pyproject.toml) ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\AMWS\.conda\envs\top2vec\python.exe' 'C:\Users\AMWS\.conda\envs\top2vec\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\AMWS\AppData\Local\Temp\tmp0c8o7bdd ERROR: Failed building wheel for hdbscan Failed to build hdbscan ERROR: Could not build wheels for hdbscan, which is required to install pyproject.toml-based

Is there any suggestions about this issue? Thanks in advance.

zhaoyi1025 avatar Nov 10 '21 12:11 zhaoyi1025

Same problem running the command: python -m pip install hdbscan on ubuntu 20.04.5 (WSL 2) and fresh venv of python3.8.10 after upgrading pip setuptools wheel to their latest versions.

To solve I had to install gcc, build-essential & python3.8-dev: sudo apt install gcc build-essential python3.8-dev

shachafl avatar Mar 03 '23 21:03 shachafl