Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install hdbscan in conda environment with gcc-14 #634

Open
dubrsl opened this issue May 15, 2024 · 3 comments
Open

Can't install hdbscan in conda environment with gcc-14 #634

dubrsl opened this issue May 15, 2024 · 3 comments

Comments

@dubrsl
Copy link

dubrsl commented May 15, 2024

Can't install hdbscan in conda environment
STR:

  1. Download and run https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
  2. Create environment, update all:
conda create -n hdbscan
conda activate hdbscan
conda update --all
  1. Install packages:
$ conda install cython numpy scipy scikit-learn pip
Channels:
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/slava/miniconda3/envs/hdbscan

  added / updated specs:
    - cython
    - numpy
    - pip
    - scikit-learn
    - scipy

The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main 
  _openmp_mutex      pkgs/main/linux-64::_openmp_mutex-5.1-1_gnu 
  blas               pkgs/main/linux-64::blas-1.0-mkl 
  bzip2              pkgs/main/linux-64::bzip2-1.0.8-h5eee18b_6 
  ca-certificates    pkgs/main/linux-64::ca-certificates-2024.3.11-h06a4308_0 
  cython             pkgs/main/linux-64::cython-3.0.10-py312h5eee18b_0 
  expat              pkgs/main/linux-64::expat-2.6.2-h6a678d5_0 
  intel-openmp       pkgs/main/linux-64::intel-openmp-2023.1.0-hdb19cb5_46306 
  joblib             pkgs/main/linux-64::joblib-1.4.0-py312h06a4308_0 
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.38-h1181459_1 
  libffi             pkgs/main/linux-64::libffi-3.4.4-h6a678d5_1 
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-11.2.0-h1234567_1 
  libgfortran-ng     pkgs/main/linux-64::libgfortran-ng-11.2.0-h00389a5_1 
  libgfortran5       pkgs/main/linux-64::libgfortran5-11.2.0-h1234567_1 
  libgomp            pkgs/main/linux-64::libgomp-11.2.0-h1234567_1 
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-11.2.0-h1234567_1 
  libuuid            pkgs/main/linux-64::libuuid-1.41.5-h5eee18b_0 
  mkl                pkgs/main/linux-64::mkl-2023.1.0-h213fc3f_46344 
  mkl-service        pkgs/main/linux-64::mkl-service-2.4.0-py312h5eee18b_1 
  mkl_fft            pkgs/main/linux-64::mkl_fft-1.3.8-py312h5eee18b_0 
  mkl_random         pkgs/main/linux-64::mkl_random-1.2.4-py312hdb19cb5_0 
  ncurses            pkgs/main/linux-64::ncurses-6.4-h6a678d5_0 
  numpy              pkgs/main/linux-64::numpy-1.26.4-py312hc5e2394_0 
  numpy-base         pkgs/main/linux-64::numpy-base-1.26.4-py312h0da6c21_0 
  openssl            pkgs/main/linux-64::openssl-3.0.13-h7f8727e_1 
  pip                pkgs/main/linux-64::pip-24.0-py312h06a4308_0 
  pybind11-abi       pkgs/main/noarch::pybind11-abi-5-hd3eb1b0_0 
  python             pkgs/main/linux-64::python-3.12.3-h996f2a0_1 
  readline           pkgs/main/linux-64::readline-8.2-h5eee18b_0 
  scikit-learn       pkgs/main/linux-64::scikit-learn-1.4.2-py312h526ad5a_1 
  scipy              pkgs/main/linux-64::scipy-1.13.0-py312hc5e2394_0 
  setuptools         pkgs/main/linux-64::setuptools-69.5.1-py312h06a4308_0 
  sqlite             pkgs/main/linux-64::sqlite-3.45.3-h5eee18b_0 
  tbb                pkgs/main/linux-64::tbb-2021.8.0-hdb19cb5_0 
  threadpoolctl      pkgs/main/noarch::threadpoolctl-2.2.0-pyh0d69192_0 
  tk                 pkgs/main/linux-64::tk-8.6.14-h39e8969_0 
  tzdata             pkgs/main/noarch::tzdata-2024a-h04d1e81_0 
  wheel              pkgs/main/linux-64::wheel-0.43.0-py312h06a4308_0 
  xz                 pkgs/main/linux-64::xz-5.4.6-h5eee18b_1 
  zlib               pkgs/main/linux-64::zlib-1.2.13-h5eee18b_1 

Proceed ([y]/n)? y
Downloading and Extracting Packages:
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
  1. install hdbscan
$ LANG=C pip install hdbscan
Collecting hdbscan
  Using cached hdbscan-0.8.33.tar.gz (5.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting cython<3,>=0.27 (from hdbscan)
  Using cached Cython-0.29.37-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.metadata (3.1 kB)
Requirement already satisfied: numpy>=1.20 in /home/slava/miniconda3/envs/hdbscan/lib/python3.12/site-packages (from hdbscan) (1.26.4)
Requirement already satisfied: scipy>=1.0 in /home/slava/miniconda3/envs/hdbscan/lib/python3.12/site-packages (from hdbscan) (1.13.0)
Requirement already satisfied: scikit-learn>=0.20 in /home/slava/.local/lib/python3.12/site-packages (from hdbscan) (1.2.2)
Requirement already satisfied: joblib>=1.0 in /home/slava/miniconda3/envs/hdbscan/lib/python3.12/site-packages (from hdbscan) (1.4.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in /home/slava/miniconda3/envs/hdbscan/lib/python3.12/site-packages (from scikit-learn>=0.20->hdbscan) (2.2.0)
Using cached Cython-0.29.37-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (2.0 MB)
Building wheels for collected packages: hdbscan
  Building wheel for hdbscan (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for hdbscan (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [136 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-312
      creating build/lib.linux-x86_64-cpython-312/hdbscan
      copying hdbscan/__init__.py -> build/lib.linux-x86_64-cpython-312/hdbscan
      copying hdbscan/flat.py -> build/lib.linux-x86_64-cpython-312/hdbscan
      copying hdbscan/hdbscan_.py -> build/lib.linux-x86_64-cpython-312/hdbscan
      copying hdbscan/plots.py -> build/lib.linux-x86_64-cpython-312/hdbscan
      copying hdbscan/prediction.py -> build/lib.linux-x86_64-cpython-312/hdbscan
      copying hdbscan/robust_single_linkage_.py -> build/lib.linux-x86_64-cpython-312/hdbscan
      copying hdbscan/validity.py -> build/lib.linux-x86_64-cpython-312/hdbscan
      creating build/lib.linux-x86_64-cpython-312/hdbscan/tests
      copying hdbscan/tests/__init__.py -> build/lib.linux-x86_64-cpython-312/hdbscan/tests
      copying hdbscan/tests/test_flat.py -> build/lib.linux-x86_64-cpython-312/hdbscan/tests
      copying hdbscan/tests/test_hdbscan.py -> build/lib.linux-x86_64-cpython-312/hdbscan/tests
      copying hdbscan/tests/test_prediction_utils.py -> build/lib.linux-x86_64-cpython-312/hdbscan/tests
      copying hdbscan/tests/test_rsl.py -> build/lib.linux-x86_64-cpython-312/hdbscan/tests
      running build_ext
      cythoning hdbscan/_hdbscan_tree.pyx to hdbscan/_hdbscan_tree.c
      /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-__v1ce2i/hdbscan_690bcb27b9474f6087a9bb44381d8770/hdbscan/_hdbscan_tree.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      cythoning hdbscan/_hdbscan_linkage.pyx to hdbscan/_hdbscan_linkage.c
      /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-__v1ce2i/hdbscan_690bcb27b9474f6087a9bb44381d8770/hdbscan/_hdbscan_linkage.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      cythoning hdbscan/_hdbscan_boruvka.pyx to hdbscan/_hdbscan_boruvka.c
      /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-__v1ce2i/hdbscan_690bcb27b9474f6087a9bb44381d8770/hdbscan/_hdbscan_boruvka.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      cythoning hdbscan/_hdbscan_reachability.pyx to hdbscan/_hdbscan_reachability.c
      /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-__v1ce2i/hdbscan_690bcb27b9474f6087a9bb44381d8770/hdbscan/_hdbscan_reachability.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      cythoning hdbscan/_prediction_utils.pyx to hdbscan/_prediction_utils.c
      /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-__v1ce2i/hdbscan_690bcb27b9474f6087a9bb44381d8770/hdbscan/_prediction_utils.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      cythoning hdbscan/dist_metrics.pyx to hdbscan/dist_metrics.c
      /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-__v1ce2i/hdbscan_690bcb27b9474f6087a9bb44381d8770/hdbscan/dist_metrics.pxd
        tree = Parsing.p_module(s, pxd, full_module_name)
      building 'hdbscan._hdbscan_tree' extension
      creating build/temp.linux-x86_64-cpython-312
      creating build/temp.linux-x86_64-cpython-312/hdbscan
      gcc -pthread -B /home/slava/miniconda3/envs/hdbscan/compiler_compat -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/slava/miniconda3/envs/hdbscan/include -fPIC -O2 -isystem /home/slava/miniconda3/envs/hdbscan/include -fPIC -I/home/slava/miniconda3/envs/hdbscan/include/python3.12 -I/tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include -c hdbscan/_hdbscan_tree.c -o build/temp.linux-x86_64-cpython-312/hdbscan/_hdbscan_tree.o
      In file included from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
                       from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                       from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                       from hdbscan/_hdbscan_tree.c:752:
      /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      gcc -pthread -B /home/slava/miniconda3/envs/hdbscan/compiler_compat -shared -Wl,-rpath,/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath-link,/home/slava/miniconda3/envs/hdbscan/lib -L/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath,/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath-link,/home/slava/miniconda3/envs/hdbscan/lib -L/home/slava/miniconda3/envs/hdbscan/lib build/temp.linux-x86_64-cpython-312/hdbscan/_hdbscan_tree.o -o build/lib.linux-x86_64-cpython-312/hdbscan/_hdbscan_tree.cpython-312-x86_64-linux-gnu.so
      building 'hdbscan._hdbscan_linkage' extension
      gcc -pthread -B /home/slava/miniconda3/envs/hdbscan/compiler_compat -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/slava/miniconda3/envs/hdbscan/include -fPIC -O2 -isystem /home/slava/miniconda3/envs/hdbscan/include -fPIC -I/home/slava/miniconda3/envs/hdbscan/include/python3.12 -I/tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include -c hdbscan/_hdbscan_linkage.c -o build/temp.linux-x86_64-cpython-312/hdbscan/_hdbscan_linkage.o
      In file included from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
                       from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                       from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                       from hdbscan/_hdbscan_linkage.c:752:
      /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      gcc -pthread -B /home/slava/miniconda3/envs/hdbscan/compiler_compat -shared -Wl,-rpath,/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath-link,/home/slava/miniconda3/envs/hdbscan/lib -L/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath,/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath-link,/home/slava/miniconda3/envs/hdbscan/lib -L/home/slava/miniconda3/envs/hdbscan/lib build/temp.linux-x86_64-cpython-312/hdbscan/_hdbscan_linkage.o -o build/lib.linux-x86_64-cpython-312/hdbscan/_hdbscan_linkage.cpython-312-x86_64-linux-gnu.so
      building 'hdbscan._hdbscan_boruvka' extension
      gcc -pthread -B /home/slava/miniconda3/envs/hdbscan/compiler_compat -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/slava/miniconda3/envs/hdbscan/include -fPIC -O2 -isystem /home/slava/miniconda3/envs/hdbscan/include -fPIC -I/home/slava/miniconda3/envs/hdbscan/include/python3.12 -I/tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include -c hdbscan/_hdbscan_boruvka.c -o build/temp.linux-x86_64-cpython-312/hdbscan/_hdbscan_boruvka.o
      In file included from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
                       from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                       from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                       from hdbscan/_hdbscan_boruvka.c:752:
      /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      gcc -pthread -B /home/slava/miniconda3/envs/hdbscan/compiler_compat -shared -Wl,-rpath,/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath-link,/home/slava/miniconda3/envs/hdbscan/lib -L/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath,/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath-link,/home/slava/miniconda3/envs/hdbscan/lib -L/home/slava/miniconda3/envs/hdbscan/lib build/temp.linux-x86_64-cpython-312/hdbscan/_hdbscan_boruvka.o -o build/lib.linux-x86_64-cpython-312/hdbscan/_hdbscan_boruvka.cpython-312-x86_64-linux-gnu.so
      building 'hdbscan._hdbscan_reachability' extension
      gcc -pthread -B /home/slava/miniconda3/envs/hdbscan/compiler_compat -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/slava/miniconda3/envs/hdbscan/include -fPIC -O2 -isystem /home/slava/miniconda3/envs/hdbscan/include -fPIC -I/home/slava/miniconda3/envs/hdbscan/include/python3.12 -I/tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include -c hdbscan/_hdbscan_reachability.c -o build/temp.linux-x86_64-cpython-312/hdbscan/_hdbscan_reachability.o
      In file included from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
                       from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                       from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                       from hdbscan/_hdbscan_reachability.c:752:
      /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      gcc -pthread -B /home/slava/miniconda3/envs/hdbscan/compiler_compat -shared -Wl,-rpath,/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath-link,/home/slava/miniconda3/envs/hdbscan/lib -L/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath,/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath-link,/home/slava/miniconda3/envs/hdbscan/lib -L/home/slava/miniconda3/envs/hdbscan/lib build/temp.linux-x86_64-cpython-312/hdbscan/_hdbscan_reachability.o -o build/lib.linux-x86_64-cpython-312/hdbscan/_hdbscan_reachability.cpython-312-x86_64-linux-gnu.so
      building 'hdbscan._prediction_utils' extension
      gcc -pthread -B /home/slava/miniconda3/envs/hdbscan/compiler_compat -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/slava/miniconda3/envs/hdbscan/include -fPIC -O2 -isystem /home/slava/miniconda3/envs/hdbscan/include -fPIC -I/home/slava/miniconda3/envs/hdbscan/include/python3.12 -I/tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include -c hdbscan/_prediction_utils.c -o build/temp.linux-x86_64-cpython-312/hdbscan/_prediction_utils.o
      In file included from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
                       from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                       from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                       from hdbscan/_prediction_utils.c:752:
      /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      gcc -pthread -B /home/slava/miniconda3/envs/hdbscan/compiler_compat -shared -Wl,-rpath,/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath-link,/home/slava/miniconda3/envs/hdbscan/lib -L/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath,/home/slava/miniconda3/envs/hdbscan/lib -Wl,-rpath-link,/home/slava/miniconda3/envs/hdbscan/lib -L/home/slava/miniconda3/envs/hdbscan/lib build/temp.linux-x86_64-cpython-312/hdbscan/_prediction_utils.o -o build/lib.linux-x86_64-cpython-312/hdbscan/_prediction_utils.cpython-312-x86_64-linux-gnu.so
      building 'hdbscan.dist_metrics' extension
      gcc -pthread -B /home/slava/miniconda3/envs/hdbscan/compiler_compat -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/slava/miniconda3/envs/hdbscan/include -fPIC -O2 -isystem /home/slava/miniconda3/envs/hdbscan/include -fPIC -I/home/slava/miniconda3/envs/hdbscan/include/python3.12 -I/tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include -c hdbscan/dist_metrics.c -o build/temp.linux-x86_64-cpython-312/hdbscan/dist_metrics.o
      In file included from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
                       from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                       from /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                       from hdbscan/dist_metrics.c:752:
      /tmp/pip-build-env-8zan49bl/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      hdbscan/dist_metrics.c: In function ‘__pyx_f_7hdbscan_12dist_metrics_18SEuclideanDistance_dist’:
      hdbscan/dist_metrics.c:7333:75: error: passing argument 1 of ‘__pyx_f_7hdbscan_12dist_metrics_18SEuclideanDistance_rdist’ from incompatible pointer type [-Wincompatible-pointer-types]
       7333 |   __pyx_t_1 = __pyx_f_7hdbscan_12dist_metrics_18SEuclideanDistance_rdist(((struct __pyx_obj_7hdbscan_12dist_metrics_DistanceMetric *)__pyx_v_self), __pyx_v_x1, __pyx_v_x2, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7hdbscan_12dist_metrics_DTYPE_t)-1.0))) __PYX_ERR(1, 474, __pyx_L1_error)
            |                                                                          ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            |                                                                           |
            |                                                                           struct __pyx_obj_7hdbscan_12dist_metrics_DistanceMetric *
      hdbscan/dist_metrics.c:7130:168: note: expected ‘struct __pyx_obj_7hdbscan_12dist_metrics_SEuclideanDistance *’ but argument is of type ‘struct __pyx_obj_7hdbscan_12dist_metrics_DistanceMetric *’
       7130 | static __pyx_t_7hdbscan_12dist_metrics_DTYPE_t __pyx_f_7hdbscan_12dist_metrics_18SEuclideanDistance_rdist(struct __pyx_obj_7hdbscan_12dist_metrics_SEuclideanDistance *__pyx_v_self, __pyx_t_7hdbscan_12dist_metrics_DTYPE_t *__pyx_v_x1, __pyx_t_7hdbscan_12dist_metrics_DTYPE_t *__pyx_v_x2, __pyx_t_7hdbscan_12dist_metrics_ITYPE_t __pyx_v_size) {
            |                                                                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
      hdbscan/dist_metrics.c: In function ‘__pyx_f_7hdbscan_12dist_metrics_17MinkowskiDistance_dist’:
      hdbscan/dist_metrics.c:8109:74: error: passing argument 1 of ‘__pyx_f_7hdbscan_12dist_metrics_17MinkowskiDistance_rdist’ from incompatible pointer type [-Wincompatible-pointer-types]
       8109 |   __pyx_t_1 = __pyx_f_7hdbscan_12dist_metrics_17MinkowskiDistance_rdist(((struct __pyx_obj_7hdbscan_12dist_metrics_DistanceMetric *)__pyx_v_self), __pyx_v_x1, __pyx_v_x2, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7hdbscan_12dist_metrics_DTYPE_t)-1.0))) __PYX_ERR(1, 563, __pyx_L1_error)
            |                                                                         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            |                                                                          |
            |                                                                          struct __pyx_obj_7hdbscan_12dist_metrics_DistanceMetric *
      hdbscan/dist_metrics.c:8025:166: note: expected ‘struct __pyx_obj_7hdbscan_12dist_metrics_MinkowskiDistance *’ but argument is of type ‘struct __pyx_obj_7hdbscan_12dist_metrics_DistanceMetric *’
       8025 | static __pyx_t_7hdbscan_12dist_metrics_DTYPE_t __pyx_f_7hdbscan_12dist_metrics_17MinkowskiDistance_rdist(struct __pyx_obj_7hdbscan_12dist_metrics_MinkowskiDistance *__pyx_v_self, __pyx_t_7hdbscan_12dist_metrics_DTYPE_t *__pyx_v_x1, __pyx_t_7hdbscan_12dist_metrics_DTYPE_t *__pyx_v_x2, __pyx_t_7hdbscan_12dist_metrics_ITYPE_t __pyx_v_size) {
            |                                                                                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
      hdbscan/dist_metrics.c: In function ‘__pyx_f_7hdbscan_12dist_metrics_18WMinkowskiDistance_dist’:
      hdbscan/dist_metrics.c:8807:75: error: passing argument 1 of ‘__pyx_f_7hdbscan_12dist_metrics_18WMinkowskiDistance_rdist’ from incompatible pointer type [-Wincompatible-pointer-types]
       8807 |   __pyx_t_1 = __pyx_f_7hdbscan_12dist_metrics_18WMinkowskiDistance_rdist(((struct __pyx_obj_7hdbscan_12dist_metrics_DistanceMetric *)__pyx_v_self), __pyx_v_x1, __pyx_v_x2, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7hdbscan_12dist_metrics_DTYPE_t)-1.0))) __PYX_ERR(1, 622, __pyx_L1_error)
            |                                                                          ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            |                                                                           |
            |                                                                           struct __pyx_obj_7hdbscan_12dist_metrics_DistanceMetric *
      hdbscan/dist_metrics.c:8614:168: note: expected ‘struct __pyx_obj_7hdbscan_12dist_metrics_WMinkowskiDistance *’ but argument is of type ‘struct __pyx_obj_7hdbscan_12dist_metrics_DistanceMetric *’
       8614 | static __pyx_t_7hdbscan_12dist_metrics_DTYPE_t __pyx_f_7hdbscan_12dist_metrics_18WMinkowskiDistance_rdist(struct __pyx_obj_7hdbscan_12dist_metrics_WMinkowskiDistance *__pyx_v_self, __pyx_t_7hdbscan_12dist_metrics_DTYPE_t *__pyx_v_x1, __pyx_t_7hdbscan_12dist_metrics_DTYPE_t *__pyx_v_x2, __pyx_t_7hdbscan_12dist_metrics_ITYPE_t __pyx_v_size) {
            |                                                                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
      hdbscan/dist_metrics.c: In function ‘__pyx_f_7hdbscan_12dist_metrics_19MahalanobisDistance_dist’:
      hdbscan/dist_metrics.c:9636:76: error: passing argument 1 of ‘__pyx_f_7hdbscan_12dist_metrics_19MahalanobisDistance_rdist’ from incompatible pointer type [-Wincompatible-pointer-types]
       9636 |   __pyx_t_1 = __pyx_f_7hdbscan_12dist_metrics_19MahalanobisDistance_rdist(((struct __pyx_obj_7hdbscan_12dist_metrics_DistanceMetric *)__pyx_v_self), __pyx_v_x1, __pyx_v_x2, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7hdbscan_12dist_metrics_DTYPE_t)-1.0))) __PYX_ERR(1, 692, __pyx_L1_error)
            |                                                                           ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            |                                                                            |
            |                                                                            struct __pyx_obj_7hdbscan_12dist_metrics_DistanceMetric *
      hdbscan/dist_metrics.c:9385:170: note: expected ‘struct __pyx_obj_7hdbscan_12dist_metrics_MahalanobisDistance *’ but argument is of type ‘struct __pyx_obj_7hdbscan_12dist_metrics_DistanceMetric *’
       9385 | static __pyx_t_7hdbscan_12dist_metrics_DTYPE_t __pyx_f_7hdbscan_12dist_metrics_19MahalanobisDistance_rdist(struct __pyx_obj_7hdbscan_12dist_metrics_MahalanobisDistance *__pyx_v_self, __pyx_t_7hdbscan_12dist_metrics_DTYPE_t *__pyx_v_x1, __pyx_t_7hdbscan_12dist_metrics_DTYPE_t *__pyx_v_x2, __pyx_t_7hdbscan_12dist_metrics_ITYPE_t __pyx_v_size) {
            |                                                                                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  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 projects

Expected result: the package will be installed.

@dubrsl
Copy link
Author

dubrsl commented May 15, 2024

With compiler version 13.2 the problem was solved:

conda config --add channels conda-forg
conda install gcc_linux-64=13.2.0

@dubrsl dubrsl changed the title Can't install hdbscan in conda environment Can't install hdbscan in conda environment with gcc-14 May 15, 2024
@reuning
Copy link

reuning commented May 24, 2024

FWIW, I had the same issue but was able to get hdbscan to build by using Cython 3 but then saw that there are other incompatibility issues

@levnikmyskin
Copy link

This is also happening on Archlinux (or I guess, any distro using gcc 14).

On Arch, this can be fixed by running:

sudo pacman -S gcc13
CC=/usr/bin/gcc-13 pip install hdbscan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants