diff --git a/src/momento/internal/_utilities/_momento_version.py b/src/momento/internal/_utilities/_momento_version.py index 7027197d..509f1e7f 100644 --- a/src/momento/internal/_utilities/_momento_version.py +++ b/src/momento/internal/_utilities/_momento_version.py @@ -11,7 +11,7 @@ import importlib_metadata momento_version = importlib_metadata.Distribution.from_name("momento").version # type: ignore[no-untyped-call,misc] -except ImportError: +except (ImportError, ModuleNotFoundError): # For python >= 3.8 from importlib.metadata import version # type: ignore[import]