diff --git a/ersilia/utils/environment.py b/ersilia/utils/environment.py index f4ce8e7f5..6dfdd4793 100644 --- a/ersilia/utils/environment.py +++ b/ersilia/utils/environment.py @@ -2,12 +2,11 @@ Utility functions to get information about the working environment. """ -import pkg_resources - +from importlib.metadata import distributions class Environment(object): def __init__(self): - self.python_packages = {pkg.key for pkg in pkg_resources.working_set} + self.python_packages = {dist.metadata['Name'] for dist in distributions()} def has_module(self, module_name): """Check if Python module is installed."""