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.82k stars 507 forks source link

AttributeError: module 'hdbscan.dist_metrics' has no attribute 'DistanceMetric' #564

Open huijiawu0 opened 2 years ago

huijiawu0 commented 2 years ago

Python 3.8.9 (default, Apr 13 2022, 08:48:06) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin, macOS 12.4 M1 Pro

wget https://github.com/scikit-learn-contrib/hdbscan/archive/master.zip unzip master.zip rm master.zip cd hdbscan-master

pip install -r requirements.txt

python setup.py install

import hdbscan

Traceback (most recent call last): File "", line 1, in File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 618, in _load_backward_compatible File "", line 259, in load_module File "/Users/hjw/PycharmProjects/memorizing-transformers-pytorch/venv/lib/python3.8/site-packages/hdbscan-0.8.28-py3.8-macosx-10.14-arm64.egg/hdbscan/init.py", line 1, in File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 618, in _load_backward_compatible File "", line 259, in loadmodule File "/Users/hjw/PycharmProjects/memorizing-transformers-pytorch/venv/lib/python3.8/site-packages/hdbscan-0.8.28-py3.8-macosx-10.14-arm64.egg/hdbscan/hdbscan.py", line 20, in File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 618, in _load_backward_compatible File "", line 259, in load_module File "/Users/hjw/PycharmProjects/memorizing-transformers-pytorch/venv/lib/python3.8/site-packages/hdbscan-0.8.28-py3.8-macosx-10.14-arm64.egg/hdbscan/_hdbscan_linkage.py", line 9, in File "/Users/hjw/PycharmProjects/memorizing-transformers-pytorch/venv/lib/python3.8/site-packages/hdbscan-0.8.28-py3.8-macosx-10.14-arm64.egg/hdbscan/_hdbscan_linkage.py", line 8, in bootstrap File "hdbscan/_hdbscan_linkage.pyx", line 1, in init hdbscan._hdbscan_linkage AttributeError: module 'hdbscan.dist_metrics' has no attribute 'DistanceMetric'