I know a number of people have posted about this before but I still can't resolve my error. I'm trying to import hdbscan but it keeps returning the following error
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-12-bf3184c2d1a0> in <module>
2 import numpy as np
3 from pyproj import Transformer
----> 4 import hdbscan
5 from scipy.spatial.qhull import ConvexHull
6 from shapely.geometry import Point
~/Library/Python/3.7/lib/python/site-packages/hdbscan/__init__.py in <module>
----> 1 from .hdbscan_ import HDBSCAN, hdbscan
2 from .robust_single_linkage_ import RobustSingleLinkage, robust_single_linkage
3 from .validity import validity_index
4 from .prediction import (approximate_predict,
5 membership_vector,
~/Library/Python/3.7/lib/python/site-packages/hdbscan/hdbscan_.py in <module>
19 from scipy.sparse import csgraph
20
---> 21 from ._hdbscan_linkage import (single_linkage,
22 mst_linkage_core,
23 mst_linkage_core_vector,
hdbscan/_hdbscan_linkage.pyx in init hdbscan._hdbscan_linkage()
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
I have tried uninstalling numpy 1.19.5 and installing numpy 1.20 but it hasn't worked for me. I have installed the package hdbscan 0.8.27, I'm using Python 3.7.2 and I do not have admin rights to my MacBook. Appreciate any help!!
I had the same issue.
I installed the hdbscan using the below method:
!pip install hdbscan --no-build-isolation --no-binary :all:
also installed the numpy 1.9.2
It works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With