INNER CODE UNIT · Python

_install_requirements

python-bonobo/bonobo · bonobo/commands/run.py:58

def _install_requirements(requirements):
    """Install requirements given a path to requirements.txt file."""
    import importlib
    import pip

    pip.main(["install", "-r", requirements])
    # Some shenanigans to be sure everything is importable after this, especially .egg-link files which
    # are referenced in *.pth files and apparently loaded by site.py at some magic bootstrap moment of the
    # python interpreter.
    pip.utils.pkg_resources = importlib.reload(pip.utils.pkg_resources)
    import site

    importlib.reload(site)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…