niftynet.utilities.util_import module

check module to be imported

require_module(name, min_version=None, descriptor='Optional', mandatory=False)[source]

Check if the module exists, and satisfies the minimum version requirement.

Returns the imported module if it satisfies requirements.

Raises ImportError and AssertionError.

Parameters:
  • name
  • min_version
  • descriptor
  • mandatory
Returns:

the imported module