Skip to content

Fix pkg_resources error message #18839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Dreamsorcerer opened this issue Mar 25, 2025 · 0 comments · Fixed by #18840
Closed

Fix pkg_resources error message #18839

Dreamsorcerer opened this issue Mar 25, 2025 · 0 comments · Fixed by #18840
Labels
bug mypy got something wrong

Comments

@Dreamsorcerer
Copy link
Contributor

Dreamsorcerer commented Mar 25, 2025

I've spent a load of time trying to figure out this error:

dependency.py:6:1: error: Library stubs not installed for "pkg_resources"  [import-untyped]
    import pkg_resources
    ^
dependency.py:6:1: note: Hint: "python3 -m pip install types-setuptools"
dependency.py:6:1: note: (or run "mypy --install-types" to install all missing stub packages)
dependency.py:6:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 17 source files)

The error would not go away by following the suggestion. It seems that because setuptools was already installed, the stubs were ignored, thus repeating the error.

The correct solution was to upgrade setuptools to a more recent release.

@Dreamsorcerer Dreamsorcerer added the bug mypy got something wrong label Mar 25, 2025
hauntsaninja added a commit to hauntsaninja/mypy that referenced this issue Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant