def is_module_satisfies(requirements, version=None, version_attr='__version__'):
 if (version is None):
  try:
   pkg_resources.get_distribution(requirements)
  except pkg_resources.DistributionNotFound:
   pass
  except (pkg_resources.UnknownExtra, pkg_resources.VersionConflict):
   return False
  else:
   return True
 requirements_parsed = pkg_resources.Requirement.parse(requirements)
 if (version is None):
  module_name = requirements_parsed.project_name
  version = get_module_attribute(module_name, version_attr)
 return (version in requirements_parsed)

def is_module_satisfies ( requirements , version = None , version_attr = '__version__' ) : if ( version is None ) : try : pkg_resources . get_distribution ( requirements ) except pkg_resources . DistributionNotFound : pass except ( pkg_resources . UnknownExtra , pkg_resources . VersionConflict ) : return False else : return True requirements_parsed = pkg_resources . Requirement . parse ( requirements ) if ( version is None ) : module_name = requirements_parsed . project_name version = get_module_attribute ( module_name , version_attr ) return ( version in requirements_parsed )
true if the module .