umap
umap copied to clipboard
No module named 'pkg_resources'
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
?
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.
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.