{"record":{"id":"209079f93d21b491","repo":"headroomlabs-ai/headroom","slug":"error-memory-eval-v2-dependencies-not-installed","errorCode":null,"errorMessage":"Error: Memory eval V2 dependencies not installed.","messagePattern":"Error: Memory eval V2 dependencies not installed\\.","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"headroom/cli/evals.py","lineNumber":626,"sourceCode":"    debug: bool,\n) -> None:\n    \"\"\"Run LoCoMo V2 memory evaluation (LLM-controlled tools).\"\"\"\n    # Suppress noisy pydantic warnings from litellm\n    import warnings\n\n    warnings.filterwarnings(\"ignore\", message=\".*Pydantic serializer warnings.*\")\n    warnings.filterwarnings(\"ignore\", category=UserWarning, module=\"pydantic\")\n\n    try:\n        from headroom.evals.memory import (\n            LoCoMoEvaluatorV2,\n            MemoryEvalConfigV2,\n        )\n    except ImportError as e:\n        click.echo(\"Error: Memory eval V2 dependencies not installed.\")\n        click.echo(\"Run: pip install headroom[memory,evals]\")\n        click.echo(f\"Details: {e}\")\n        raise SystemExit(1) from None\n\n    import asyncio\n\n    # Build configuration\n    parsed_categories = _parse_categories(categories)\n\n    eval_config = MemoryEvalConfigV2(\n        n_conversations=n_conversations,\n        categories=parsed_categories,\n        skip_adversarial=not include_adversarial,\n        llm_judge_enabled=llm_judge,\n        llm_judge_model=judge_model,\n        f1_threshold=f1_threshold,\n        parallel_workers=parallel,\n        debug=debug,\n        save_model=save_model,\n        answer_model=answer_model,\n        max_search_results=max_results,","sourceCodeStart":608,"sourceCodeEnd":644,"githubUrl":"https://github.com/headroomlabs-ai/headroom/blob/322425c43bffde1ed0b64fecf3cf5951565dd82b/headroom/cli/evals.py#L608-L644","documentation":"The V2 memory eval command (headroom evals memory-v2 or equivalent) imports LoCoMoEvaluatorV2 / MemoryEvalConfigV2 from headroom.evals.memory inside the command. If those imports fail (optional memory/evals deps missing on this install), the ImportError is caught, a message pointing at 'pip install headroom[memory,evals]' plus the underlying 'Details:' is printed, and the process exits 1. Same dependency guard as the V1 path but for the V2 evaluator stack.","triggerScenarios":"Running the V2 memory eval CLI subcommand in an environment where headroom.evals.memory cannot import (missing extras, or a headroom version where the V2 modules live behind an extra).","commonSituations":"Bare headroom-ai install; CI images without extras; upgrading headroom and forgetting to reinstall extras; Python version where an eval dep lacks a wheel.","solutions":["pip install 'headroom-ai[memory,evals]'","Check the 'Details:' line for the exact missing module and pip install it by name","Confirm the active interpreter/venv is the one headroom was installed into","If V2 modules are absent in your headroom version, upgrade headroom-ai"],"exampleFix":"# before\n$ headroom evals memory-v2\n# Error: Memory eval V2 dependencies not installed.\n\n# after\n$ pip install 'headroom-ai[memory,evals]' --upgrade\n$ headroom evals memory-v2","handlingStrategy":"validation","validationCode":"try:\n    from headroom.evals.memory import LoCoMoEvaluatorV2  # noqa: F401\n    V2_OK = True\nexcept ImportError:\n    V2_OK = False\n\nif not V2_OK:\n    raise SystemExit(\"pip install 'headroom-ai[memory,evals]' before running V2 evals\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install [memory,evals] extras in every environment that runs V2 evals","Check importability of headroom.evals.memory in a preflight step","Upgrade headroom and extras together so V2 module names stay importable"],"tags":["cli","evals","optional-dependencies","importerror","v2"],"backgroundTag":null,"analyzedSha":"322425c43bffde1ed0b64fecf3cf5951565dd82b","analyzedAt":"2026-08-15T01:03:05.481Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}