()
| 190 | |
| 191 | |
| 192 | def is_installed(): |
| 193 | if not os.path.exists(BACKEND_DIR) or not os.path.exists(SYSTEM_DIR) or not os.path.exists(WEBUI_DIR): |
| 194 | return True |
| 195 | |
| 196 | env = dict(os.environ) |
| 197 | env.update(get_env()) |
| 198 | |
| 199 | try: |
| 200 | out = check_output_in_conda(["python", "-m", "pip", "show", "torch"], env=env) |
| 201 | return "Version" in out.decode() |
| 202 | except subprocess.CalledProcessError: |
| 203 | pass |
| 204 | |
| 205 | return False |
| 206 | |
| 207 | |
| 208 | def run_in_conda(cmds: list, *args, **kwargs): |
no test coverage detected