diff --git a/foqus_lib/gui/main/mainWindow.py b/foqus_lib/gui/main/mainWindow.py index 19fcc08a5..92083603c 100644 --- a/foqus_lib/gui/main/mainWindow.py +++ b/foqus_lib/gui/main/mainWindow.py @@ -61,7 +61,7 @@ try: from importlib import metadata -except ModuleNotFoundError: +except ImportError: import importlib_metadata as metadata from typing import Dict from types import ModuleType diff --git a/setup.py b/setup.py index b4999cf58..afc6ee5c5 100644 --- a/setup.py +++ b/setup.py @@ -118,6 +118,7 @@ "TurbineClient ~= 4.0, >= 4.0.3", "winshell; sys_platform == 'win32'", "websocket_client>=1.1.0", + "importlib_metadata; python_version < '3.8'", ], )