{"record":{"id":"3e6b3903d316bd78","repo":"headroomlabs-ai/headroom","slug":"anthropic-package-required-install-with-pip-inst-3e6b39","errorCode":null,"errorMessage":"Anthropic package required. Install with: pip install anthropic","messagePattern":"Anthropic package required\\. Install with: pip install anthropic","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"headroom/evals/html_extraction.py","lineNumber":310,"sourceCode":"                        question=question,\n                        ground_truth=ground_truth,\n                        prediction=prediction,\n                    )\n                    anthropic_response = anthropic_client.messages.create(\n                        model=self.judge_model,\n                        max_tokens=200,\n                        messages=[{\"role\": \"user\", \"content\": prompt}],\n                    )\n                    text = (\n                        getattr(anthropic_response.content[0], \"text\", \"\")\n                        if anthropic_response.content\n                        else \"\"\n                    )\n                    return self._parse_judge_response(text)\n\n                return judge\n            except ImportError:\n                raise ImportError(\n                    \"Anthropic package required. Install with: pip install anthropic\"\n                ) from None\n\n        else:\n            try:\n                import litellm\n\n                def judge(question: str, ground_truth: str, prediction: str) -> tuple[float, str]:\n                    prompt = HTML_JUDGE_PROMPT.format(\n                        question=question,\n                        ground_truth=ground_truth,\n                        prediction=prediction,\n                    )\n                    response = litellm.completion(\n                        model=self.judge_model,\n                        messages=[{\"role\": \"user\", \"content\": prompt}],\n                        temperature=0.0,\n                        max_tokens=200,","sourceCodeStart":292,"sourceCodeEnd":328,"githubUrl":"https://github.com/headroomlabs-ai/headroom/blob/322425c43bffde1ed0b64fecf3cf5951565dd82b/headroom/evals/html_extraction.py#L292-L328","documentation":"Error \"Anthropic package required. Install with: pip install anthropic\" thrown in headroomlabs-ai/headroom.","triggerScenarios":"Raised when the HTML extraction eval is configured to use an Anthropic model but the `anthropic` package is not installed.","commonSituations":"See trigger scenarios.","solutions":["Install the Anthropic package: pip install anthropic","Or install the evals extra: pip install headroom-ai[evals]"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"322425c43bffde1ed0b64fecf3cf5951565dd82b","analyzedAt":"2026-08-15T01:03:05.481Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}