def install_given_reqs(<EOL>to_install,  <EOL>install_options,  <EOL>global_options=(),  <EOL>*args, **kwargs<EOL>):<EOL>
if to_install:<EOL><INDENT>logger.info(<EOL>'<STR_LIT>',<EOL>'<STR_LIT:U+002CU+0020>'.join([req.name for req in to_install]),<EOL>)<EOL><DEDENT>with indent_log():<EOL><INDENT>for requirement in to_install:<EOL><INDENT>if requirement.conflicts_with:<EOL><INDENT>logger.info(<EOL>'<STR_LIT>',<EOL>requirement.conflicts_with,<EOL>)<EOL>with indent_log():<EOL><INDENT>uninstalled_pathset = requirement.uninstall(<EOL>auto_confirm=True<EOL>)<EOL><DEDENT><DEDENT>try:<EOL><INDENT>requirement.install(<EOL>install_options,<EOL>global_options,<EOL>*args,<EOL>**kwargs<EOL>)<EOL><DEDENT>except Exception:<EOL><INDENT>should_rollback = (<EOL>requirement.conflicts_with and<EOL>not requirement.install_succeeded<EOL>)<EOL>if should_rollback:<EOL><INDENT>uninstalled_pathset.rollback()<EOL><DEDENT>raise<EOL><DEDENT>else:<EOL><INDENT>should_commit = (<EOL>requirement.conflicts_with and<EOL>requirement.install_succeeded<EOL>)<EOL>if should_commit:<EOL><INDENT>uninstalled_pathset.commit()<EOL><DEDENT><DEDENT>requirement.remove_temporary_source()<EOL><DEDENT><DEDENT>return to_install<EOL>
Install everything in the given list.

(to be called after having downloaded and unpacked the packages)