Pip install r. Args: requirements_path: TODO.
(requirements_path)
| 31 | |
| 32 | |
| 33 | def pip_install_r(requirements_path): |
| 34 | """Pip install r. |
| 35 | |
| 36 | Args: |
| 37 | requirements_path: TODO. |
| 38 | """ |
| 39 | cmd = [] |
| 40 | if shutil.which("pip") is not None: |
| 41 | cmd = ["pip"] |
| 42 | elif shutil.which("uv") is not None: |
| 43 | cmd = ["uv", "pip"] |
| 44 | else: |
| 45 | raise RuntimeError("pip not found, failed to install model requirements") |
| 46 | cmd += ["install", "-r", requirements_path] |
| 47 | return subprocess.run( |
| 48 | cmd, |
| 49 | stdout=subprocess.PIPE, |
| 50 | stderr=subprocess.PIPE, |
| 51 | text=True, |
| 52 | ) |
no test coverage detected
searching dependent graphs…