def get_or_create_venv(self, path: Path) -> Path:
requirements_option, requirements_hash = self.get_requirements_information(path)<EOL>venv_path = self.get_virtualenv_path(requirements_option, requirements_hash)<EOL>if not venv_path.exists():<EOL><INDENT>logger.info(f"<STR_LIT>")<EOL>builder = EnvBuilder(with_pip=True)<EOL>builder.create(venv_path)<EOL>shell = False<EOL>cmd = None<EOL>cwd = None<EOL>if requirements_option == RequirementsOptions.pipfile:<EOL><INDENT>cmd = ["<STR_LIT:source>", (str(venv_path / "<STR_LIT>" / "<STR_LIT>")), "<STR_LIT>",<EOL>"<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]<EOL>cmd = "<STR_LIT:U+0020>".join(cmd)<EOL>cwd = path / self.pipfile_location<EOL>shell = True<EOL><DEDENT>elif requirements_option == RequirementsOptions.requirements_txt:<EOL><INDENT>requirements_file = path / self.requirements_location<EOL>logger.debug("<STR_LIT>")<EOL>logger.debug(requirements_file.read_text())<EOL>logger.info("<STR_LIT>", requirements_file)<EOL>cmd = [str(venv_path / "<STR_LIT>" / "<STR_LIT>"), "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>",<EOL>shlex.quote(str(requirements_file))]<EOL><DEDENT>if cmd is not None:<EOL><INDENT>logger.info("<STR_LIT>", cmd, shell)<EOL>process = subprocess.Popen(cmd,<EOL>stdout=subprocess.PIPE,<EOL>stderr=subprocess.PIPE,<EOL>shell=shell,<EOL>cwd=cwd)<EOL>try:<EOL><INDENT>out_stream, err_stream = process.communicate(timeout=self.requirements_timeout)<EOL><DEDENT>except subprocess.TimeoutExpired:<EOL><INDENT>process.kill()<EOL>logger.warning("<STR_LIT>")<EOL>shutil.rmtree(str(venv_path), ignore_errors=True)<EOL>raise BuildTimeoutError(f"<STR_LIT>"<EOL>f"<STR_LIT>")<EOL><DEDENT>out_stream = out_stream.decode("<STR_LIT:utf-8>")<EOL>err_stream = err_stream.decode("<STR_LIT:utf-8>")<EOL>logger.debug("<STR_LIT>", process.returncode)<EOL>logger.debug(out_stream)<EOL>logger.debug(err_stream)<EOL>if process.returncode:<EOL><INDENT>logger.warning("<STR_LIT>")<EOL>shutil.rmtree(str(venv_path), ignore_errors=True)<EOL>raise BuildError("<STR_LIT>", extra_info={<EOL>"<STR_LIT>": out_stream,<EOL>"<STR_LIT>": err_stream,<EOL>"<STR_LIT>": process.returncode<EOL>})<EOL><DEDENT><DEDENT>else:<EOL><INDENT>logger.info("<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>logger.info(f"<STR_LIT>")<EOL><DEDENT>return venv_path<EOL>
Gets the location of  the virtualenv from :meth:`get_virtualenv_path`, checks if it exists already,
creates it and installs requirements otherwise. The virtualenvs are stored in a folder based
on the :class:`Arca` ``base_dir`` setting.

:param path: :class:`Path <pathlib.Path>` to the cloned repository.