MCPcopy Create free account
hub / github.com/ComfyWorkflows/ComfyUI-Launcher / install_pip_reqs

Function install_pip_reqs

server/utils.py:458–471  ·  view source on GitHub ↗
(project_folder_path, pip_reqs)

Source from the content-addressed store, hash-verified

456 json.dump(existing_state, f)
457
458def install_pip_reqs(project_folder_path, pip_reqs):
459 if not pip_reqs:
460 return
461 print("Installing pip requirements...")
462 with open(os.path.join(project_folder_path, "requirements.txt"), "w") as f:
463 for req in pip_reqs:
464 if isinstance(req, str):
465 f.write(req + "\n")
466 elif isinstance(req, dict):
467 f.write(f"{req['_key']}=={req['_version']}\n")
468 run_command_in_project_venv(
469 project_folder_path,
470 f"pip install -r {os.path.join(project_folder_path, 'requirements.txt')}",
471 )
472
473def get_project_port(id):
474 project_path = os.path.join(PROJECTS_DIR, id)

Callers 1

create_comfyui_projectFunction · 0.90

Calls 1

Tested by

no test coverage detected