lmcinnes / lmcinnes/umap

No module named 'pkg_resources'

Open
#1,065 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.3k
Forks
871
Avg merge
1d 13h
Merged PRs (30d)
5

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect setup.py and the package installation requirements, then reproduce the import in a clean Python 3.11 virtual environment. Done means a fresh installation provides the dependency needed for importing umap without requiring a separate setuptools install.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.