> The error here will move to the first usage of something from numpy. There is a semi-lazy alternative:
import importlib.util
if importlib.util.find_spec("numpy") is None:
... # whatever you wanted to do if numpy is missing
lazy import numpy