Documentation

Type defined in library builtins

ImportError

Python raises an import error when a name to be imported is not defined in the module it is to be imported from.

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 pytamaro import elipse
error
ImportError: cannot import name 'elipse' from 'pytamaro'. Did you mean: 'ellipse'?
Code
from math import py
error
ImportError: cannot import name 'py' from 'math'. Did you mean: 'pi'?
Code
from math import randint
error
ImportError: cannot import name 'randint' from 'math'.

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)