def requirement_is_installed(expr):
    required_dist = next(parse_requirements(expr))
    try:
        installed_dist = get_distribution(required_dist.key)
        return installed_dist in required_dist
    except DistributionNotFound:
        return False
Check whether a requirement is installed.
dataset/ETHPy150Open paylogic/pip-accel/pip_accel/utils.py/requirement_is_installed