MCPcopy Index your code
hub / github.com/easydiffusion/easydiffusion / install

Function install

scripts/check_modules.py:87–98  ·  view source on GitHub ↗
(module_name: str, module_version: str, index_url=None)

Source from the content-addressed store, hash-verified

85
86
87def install(module_name: str, module_version: str, index_url=None):
88 install_cmd = f'"{sys.executable}" -m pip install --upgrade {module_name}=={module_version}'
89
90 if index_url:
91 install_cmd += f" --index-url {index_url}"
92 if module_name == "sdkit" and version("sdkit") is not None:
93 install_cmd += " -q"
94 if module_name in ("basicsr", "gfpgan"):
95 install_cmd += " --use-pep517" # potential fix for https://github.com/easydiffusion/easydiffusion/issues/1942
96
97 print(">", install_cmd)
98 os.system(install_cmd)
99
100
101def update_modules():

Callers 1

update_modulesFunction · 0.70

Calls 1

versionFunction · 0.70

Tested by

no test coverage detected