Skip to content

Commit

Permalink
Update environment.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DhanshreeA authored Oct 25, 2024
1 parent 632d239 commit 5e60dfe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ersilia/utils/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit 5e60dfe

Please sign in to comment.