def is_installed(requirement): try: pkg_resources.require(requirement) except pkg_resources.ResolutionError: return False else: return True