bmabey/pyLDAvis

AttributeError: module 'sklearn.metrics._dist_metrics' has no attribute 'DistanceMetric32'

marianeira opened this issue · 1 comments

I am using the pyldavis library which depends on scikit learn, I have been working for months without any problem. Today at night a new error appeared when I tried the library

import pyLDAvis
AttributeError: module 'sklearn.metrics._dist_metrics' has no attribute 'DistanceMetric32'.

If I try to import the function directly

from sklearn.metrics import _dist_metrics

it returns the same error

Steps/Code to Reproduce

import pyLDAvis

Expected Results
No error is thrown

Actual Results
File sklearn/metrics/_pairwise_distances_reduction/_base.pyx:1, in init sklearn.metrics._pairwise_distances_reduction._base()

AttributeError: module 'sklearn.metrics._dist_metrics' has no attribute 'DistanceMetric32'

Versions
System:

python: 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:35:26) [GCC 10.4.0]
executable: /home/trusted-service-user/cluster-env/env/bin/python
machine: Linux-4.15.0-1165-azure-x86_64-with-glibc2.27

Python dependencies:
sklearn: 1.1.3
pip: 22.3.1
setuptools: 65.5.1
numpy: 1.23.4
scipy: 1.9.3
Cython: 0.29.32
pandas: 1.5.1
matplotlib: 3.6.2
joblib: 1.2.0
threadpoolctl: 3.1.0

Built with OpenMP: True

threadpoolctl info:
user_api: blas
internal_api: mkl
prefix: libmkl_rt
filepath: /home/trusted-service-user/cluster-env/env/lib/libmkl_rt.so.2
version: 2022.1-Product
threading_layer: intel
num_threads: 8

   user_api: openmp

internal_api: openmp
prefix: libomp
filepath: /home/trusted-service-user/cluster-env/env/lib/libomp.so
version: None
num_threads: 16

   user_api: openmp

internal_api: openmp
prefix: libgomp
filepath: /home/trusted-service-user/cluster-env/env/lib/python3.10/site-packages/scikit_learn.libs/libgomp-a34b3233.so.1.0.0
version: None
num_threads: 16

msusol commented

import pyLDAvis

What version? If it is not vs 3.4.1, then please try and reopen if you still get the same errors