def create_virtual_env(venv_path: str,
                       requirements_paths: Iterable[str],
                       python_path: str,
                       verbose: bool) -> None:
    """Creates a new virtual environment and then installs dependencies.

    Args:
        venv_path: Where to put the virtual environment's state.
        requirements_paths: Location of requirements files to -r install.
        python_path: The python binary to use.
        verbose: When set, more progress output is produced.
    """
    shell_tools.run_cmd('virtualenv',
                        None if verbose else '--quiet',
                        '-p',
                        python_path,
                        venv_path,
                        out=sys.stderr)
    pip_path = os.path.join(venv_path, 'bin', 'pip')
    for req_path in requirements_paths:
        shell_tools.run_cmd(pip_path,
                            'install',
                            None if verbose else '--quiet',
                            '-r',
                            req_path,
                            out=sys.stderr)
def create_virtual_env ( venv_path : str , requirements_paths : Iterable [ str ] , python_path : str , verbose : bool ) -> None : shell_tools . run_cmd ( 'virtualenv' , None if verbose else '--quiet' , '-p' , python_path , venv_path , out = sys . stderr ) pip_path = os . path . join ( venv_path , 'bin' , 'pip' ) for req_path in requirements_paths : shell_tools . run_cmd ( pip_path , 'install' , None if verbose else '--quiet' , '-r' , req_path , out = sys . stderr )
Creates a new virtual environment and then installs dependencies.

    Args:
        venv_path: Where to put the virtual environment's state.
        requirements_paths: Location of requirements files to -r install.
        python_path: The python binary to use.
        verbose: When set, more progress output is produced.