Documentation

Type defined in library builtins

ModuleNotFoundError

Python raises a module not found error when it cannot find the library (i.e., the module) mentioned in an import statement.

A module not found error is a special kind of import error.

Note that the text of the error message depends on the implementation. Different versions of Python and different checking tools will give slightly different messages.

Code
from pitamaro import rectangle
error
ModuleNotFoundError: No module named 'pitamaro'
Code
import maths
error
ModuleNotFoundError: No module named 'maths'

Logo of PyTamaro

PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI

Privacy PolicyPlatform Version a9143b0 (Sun, 14 Dec 2025 12:09:46 GMT)