umap icon indicating copy to clipboard operation
umap copied to clipboard

No module named 'pkg_resources'

Open erooke opened this issue 1 year ago • 2 comments

I just recently installed umap. On attempting to import umap I got the following error:

 python umap_1.py
Traceback (most recent call last):
  File "/home/ethan/code/umap_1.py", line 2, in <module>
    import umap
  File "/home/ethan/code/.venv/lib/python3.11/site-packages/umap/__init__.py", line 36, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Installing setuptools into the venv fixed the issue. Should setuptools be declared as a dependency in setup.py?

erooke avatar Oct 10 '23 18:10 erooke

Ciao! Not a maintainer here, but I'd like to ask you a couple of questions. What Python version are you using?

pkg_resources is deprecated and should be replaced with importlib.resources or, if not available, by installing the importlib-resources. I did a similar PR a while ago, should be fairly easy.

baggiponte avatar Dec 11 '23 15:12 baggiponte

The version I ran into this issue on was 3.11.?

Unfortunately I no longer have the project I was working on around and a quick attempt to replicate the issue failed (that is to say umap installed and imported fine). I'm not sure if I'm going to be much help from here.

erooke avatar Dec 15 '23 18:12 erooke