def install_package(requirement_str, error_level=None, error_msg=None):
    """Installs the given package via ``pip``.

    Installation is performed via::

        python -m pip install <requirement_str>

    Args:
        requirement_str: a PEP 440 compliant package requirement, like
            "tensorflow", "tensorflow<2", "tensorflow==2.3.0", or
            "tensorflow>=1.13,<1.15"
        error_level (None): the error level to use, defined as:

            -   0: raise error if the install fails
            -   1: log warning if the install fails
            -   2: ignore install fails

        error_msg (None): an optional custom error message to use
    """
    if error_level is None:
        error_level = fo.config.requirement_error_level

    return etau.install_package(
        requirement_str,
        error_level=error_level,
        error_msg=error_msg,
    )
Installs the given package via ``pip``.

    Installation is performed via::

        python -m pip install <requirement_str>

    Args:
        requirement_str: a PEP 440 compliant package requirement, like
            "tensorflow", "tensorflow<2", "tensorflow==2.3.0", or
            "tensorflow>=1.13,<1.15"
        error_level (None): the error level to use, defined as:

            -   0: raise error if the install fails
            -   1: log warning if the install fails
            -   2: ignore install fails

        error_msg (None): an optional custom error message to use
    
fiftyone/core/utils.py