Why use absolute instead of relative imports in a Python package?
10:26 16 Jan 2019

I've recently created a Python package, and within it, used only relative imports to access functions stored in other methods.

Now, in Numpy, I see a lot of files that make heavy use of absolute imports, e.g. this file. It has a lot of statements like from numpy.core import overrides.

I don't see a disadvantage in using relative imports. Why are they doing it like that, instead of from ..core import overrides? Doesn't the absolute import require numpy to be already installed?

best-practices python numpy