lmcinnes / umap

Uniform Manifold Approximation and Projection
BSD 3-Clause "New" or "Revised" License
7.39k stars 803 forks source link

No module named importlib #1076

Open AnjaConev opened 10 months ago

AnjaConev commented 10 months ago

Hi,

upon the new 0.5.5 release you have changed the deprecated dependency of pkg_resources to importlib-metadata. However, I keep getting an error: No module named 'importlib.metadata'

~/anaconda3/envs/core/lib/python3.6/site-packages/umap/init.py in 34 import numba 35 ---> 36 from importlib.metadata import version, PackageNotFoundError 37 ModuleNotFoundError: No module named 'importlib.metadata'

I have importlib-metadata installed (version 4.8.2).

Online sources say that the imports should be from importlib_metadata instead of from importlib.metadata.

lmcinnes commented 10 months ago

I believe you need python 3.8 or newer and then importlib.metadata is in the stdlib.

baggiponte commented 9 months ago

I think UMAP-learn should specify in the requirements in setup.py something like "importlib_resources>=5.10.2; python_version < \"3.9\"" depending on the required Python version.

Related: #1065