python / python/mypy

Give users suggestions on how to resolve `Cannot find implementation or library stub for module named "{module}"`

Open
#15,739 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

Feature

Give users suggestions on how to resolve Cannot find implementation or library stub for module named "{module}".

Pitch

I'm new to the ecosystem and didn't know a command that would fix mypy failing is pip install numpy. I think a suggestion on how to resolve this issue would help out people who don't use Python regularly, like myself.

Current behavior

p.py:1: error: Cannot find implementation or library stub for module named "numpy"
p.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

Desired behavior

p.py:1: error: Cannot find implementation or library stub for module named "numpy"
p.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
p.py:1: note: The following command may help: pip install numpy

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

Start at the mypy diagnostic for Cannot find implementation or library stub for module named "{module}" and review the existing missing-import documentation linked in the message. Determine how suggestions such as pip install numpy should be selected and displayed, then verify that the diagnostic includes a useful command without breaking existing output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.