MCPcopy Create free account
hub / github.com/modelscope/FunASR / pip_install_r

Function pip_install_r

funasr/utils/install_model_requirements.py:33–52  ·  view source on GitHub ↗

Pip install r. Args: requirements_path: TODO.

(requirements_path)

Source from the content-addressed store, hash-verified

31
32
33def 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 )

Callers 1

install_requirementsFunction · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…