umap icon indicating copy to clipboard operation
umap copied to clipboard

No module named importlib

Open AnjaConev opened this issue 2 years ago • 2 comments

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.

AnjaConev avatar Dec 03 '23 21:12 AnjaConev

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

lmcinnes avatar Dec 06 '23 14:12 lmcinnes

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

baggiponte avatar Dec 11 '23 15:12 baggiponte