import pkgutil


def has_module(name):
    """
    Check to see if a module is installed by name without
    actually importing the module.

    Parameters
    ------------
    name : str
      The name of the module to check

    Returns
    ------------
    installed : bool
      True if module is installed
    """
    # this should work on Python 2.7 and 3.4+
    return pkgutil.find_loader(name) is not None