diff --git a/jcvi/__init__.py b/jcvi/__init__.py index 75633151..89bf10ae 100644 --- a/jcvi/__init__.py +++ b/jcvi/__init__.py @@ -1,5 +1,5 @@ from datetime import datetime -from pkg_resources import get_distribution, DistributionNotFound +from importlib.metadata import version, PackageNotFoundError __author__ = ( @@ -15,8 +15,8 @@ try: - VERSION = get_distribution(__name__).version -except DistributionNotFound: # pragma: no cover + VERSION = version(__name__) +except PackageNotFoundError: # pragma: no cover try: from .version import version as VERSION # noqa except ImportError as exc: # pragma: no cover