Hdbscan: Import of hdbscan==0.8.20 fails with scikit-learn==0.21.0

Created on 10 May 2019  路  7Comments  路  Source: scikit-learn-contrib/hdbscan

If scikit-learn is installed in version 0.21.0, importing hdbscan in version 0.8.20 gives the following error:

~/libertem-venv/lib/python3.6/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, membership_vector, all_points_membership_vectors
      5 

~/libertem-venv/lib/python3.6/site-packages/hdbscan/hdbscan_.py in <module>
     15 from warnings import warn
     16 from sklearn.utils import check_array
---> 17 from sklearn.externals.joblib.parallel import cpu_count
     18 
     19 from scipy.sparse import csgraph

ModuleNotFoundError: No module named 'sklearn.externals.joblib.parallel'

Downgrading to scikit-learn==0.20.2 works around the issue.

Most helpful comment

I believe this was fixed in the more recent hdbscan releases with joblib handled separately.

All 7 comments

I can confirm the same problem.

PR #297 should fix this -- hopefully I'll get a release with the fix out soon.

is there any solution for this issue

Is there and update on this?
It is my understanding that any scikit-learn version >= 0.21.0 will have this conflict (I'm using 0.22.2) .
Downgrading to version 0.20 is not an option for me and it seems like a dead end at the moment.

I believe this was fixed in the more recent hdbscan releases with joblib handled separately.

Thank you for you prompt response.

After successfully installing the latest version using pip the problem was indeed resolved.
(I had another problem with python 3.6 and the enum library that I had to removed, that might have confused me).

Perhaps worth closing this ticket?

BTW, These are the current version dependencies:

image

Thanks; glad it indeed works now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

architec997 picture architec997  路  14Comments

sigma23 picture sigma23  路  10Comments

esvhd picture esvhd  路  7Comments

Phlya picture Phlya  路  15Comments

prighini picture prighini  路  15Comments