hdbscan
hdbscan copied to clipboard
Installation issue
I am getting this installation error
hdbscan/_hdbscan_tree.c:4:10: fatal error: Python.h: No such file or directory #include "Python.h" ^~~~~~~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1
ERROR: Failed building wheel for hdbscan
It looks like you are missing the header files for your Python installation. How to install them can vary depending on the version of Python you are using, and on which operating system. For example, on my Debian Linux installation, I'd have to run sudo apt install python3-dev
Seems like people are also facing this issue: https://github.com/scikit-learn-contrib/hdbscan/issues/428
I fixed the same issue by running sudo apt install python*your version of python*-dev. For me, it was sudo apt install python3.9-dev
Doesn't work for me (Ubuntu from WSL):
ERROR: Could not build wheels for hdbscan, which is required to install pyproject.toml-based projects
You also need to install build-essential:
apt-get install build-essential