def _install_mp()

in utils/nb_check.py [0:0]


def _install_mp(mp_install_version, exact_version, extras, quiet=True):
    """Try to install MSTICPY."""
    sp_args = ["install", "--no-input"]
    if quiet:
        sp_args.append("--quiet")
    pkg_op = "==" if exact_version else ">="
    mp_pkg_spec = f"msticpy[{','.join(extras)}]" if extras else "msticpy"
    mp_pkg_spec = f"{mp_pkg_spec}{pkg_op}{mp_install_version}"
    sp_args.append(mp_pkg_spec)

    _disp_html(
        f"<br>Running pip {' '.join(sp_args)} - this may take a few moments...<br>"
    )

    ip_shell = get_ipython()
    ip_shell.run_line_magic("pip", " ".join(sp_args))