Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix pkg_resources error message #18839

Description

@Dreamsorcerer

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions