mypy Skipping analyzing / Library stubs not installed (tested)
mypy has three import errors: Skipping analyzing "x": module is installed, but missing library stubs or py.typed marker (no types available: ignore that module), Library stubs not installed for "x" (run pip install types-x), and Cannot find implementation or library stub (mypy cannot see the package at all).
1. The three import errors side by side
Output (mypy 2.4.0, Python 3.13.5; celery installed, tabulate and notinstalled not installed):
$ cat b1.py
import celery
import tabulate
import notinstalled
$ mypy b1.py
b1.py:1: error: Skipping analyzing "celery": module is installed, but missing library stubs or py.typed marker [import-untyped]
b1.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
b1.py:2: error: Library stubs not installed for "tabulate" [import-untyped]
b1.py:2: note: Hint: "python3 -m pip install types-tabulate"
b1.py:2: note: (or run "mypy --install-types" to install all missing stub packages)
b1.py:3: error: Cannot find implementation or library stub for module named "notinstalled" [import-not-found]
Found 3 errors in 1 file (checked 1 source file)
$ mypy --ignore-missing-imports b1.py
Success: no issues found in 1 source file
$ cat mypy.ini
[mypy]
[mypy-celery.*]
ignore_missing_imports = True
$ mypy b1.py
b1.py:2: error: Library stubs not installed for "tabulate" [import-untyped]
b1.py:3: error: Cannot find implementation or library stub for module named "notinstalled" [import-not-found]
Found 2 errors in 1 file (checked 1 source file)
2. What each one means
Skipping analyzing "celery": module is installed, but missing library stubs or py.typed marker: the package is there but ships no type information and typeshed has no stub package for it. Ignore it per module (the[mypy-celery.*]section, which also covered the top-levelceleryimport here) or look for a third-party stub package.Library stubs not installed for "tabulate": typeshed has a stub package for it. Install it as the hint says:pip install types-tabulate, ormypy --install-types. This appeared even though tabulate itself was not installed in this environment.Cannot find implementation or library stub for module named "notinstalled"(codeimport-not-found): mypy cannot find the module at all. Usually mypy runs in a different environment than your packages (runpython -m mypyfrom the project's venv), or the path needsMYPYPATH.
3. Ignoring
--ignore-missing-imports silenced all three at once, including the real import-not-found one, so prefer the per-module config section shown above, which left the other two errors visible.
Frequently asked questions
How do I fix module is installed, but missing library stubs or py.typed marker?
Add a per-module section [mypy-pkg.*] with ignore_missing_imports = True, or install a third-party stub package if one exists.
How do I fix Library stubs not installed?
Install the stub package the hint names, e.g. pip install types-tabulate, or run mypy --install-types.
Is --ignore-missing-imports safe?
It hides all three errors, including modules that are genuinely missing. Prefer a per-module setting.
Written with AI assistance. Measured on 2026-10-23 with mypy 2.4.0 and Python 3.13.5 on Linux. Commands ran verbatim and the output was pasted unedited. PlainTables is our extension; mypy is free.