def ensure_requirements(
    requirements_path, error_level=None, log_success=False
):
    """Verifies that the package requirements from a ``requirements.txt`` file
    on disk are installed.

    Args:
        requirements_path: the path to a requirements file
        error_level (None): the error level to use, defined as:

            -   0: raise error if requirement is not satisfied
            -   1: log warning if requirement is not satisfied
            -   2: ignore unsatisifed requirements

            By default, ``fiftyone.config.requirement_error_level`` is used
        log_success (False): whether to generate a log message if a requirement
            is satisfied
    """
    for req_str in load_requirements(requirements_path):
        ensure_package(
            req_str, error_level=error_level, log_success=log_success
        )
Verifies that the package requirements from a ``requirements.txt`` file
    on disk are installed.

    Args:
        requirements_path: the path to a requirements file
        error_level (None): the error level to use, defined as:

            -   0: raise error if requirement is not satisfied
            -   1: log warning if requirement is not satisfied
            -   2: ignore unsatisifed requirements

            By default, ``fiftyone.config.requirement_error_level`` is used
        log_success (False): whether to generate a log message if a requirement
            is satisfied
    
fiftyone/core/utils.py