diff --git a/audmetric/__init__.py b/audmetric/__init__.py index 25c30f6..a75f5bc 100644 --- a/audmetric/__init__.py +++ b/audmetric/__init__.py @@ -26,9 +26,9 @@ # Dynamically get the version of the installed module try: - import pkg_resources - __version__ = pkg_resources.get_distribution(__name__).version + import importlib.metadata + __version__ = importlib.metadata.version(__name__) except Exception: # pragma: no cover - pkg_resources = None # pragma: no cover + importlib = None # pragma: no cover finally: - del pkg_resources + del importlib