def get_installed_pypackages():
    return {p.project_name.lower(): p for p in pkg_resources.working_set}
def _raise_or_warn(self, warn_only, msg):
        if warn_only:
            self._warnings.append(msg)
        else:
            raise TransactionError(msg)