headroomlabs-ai/headroom · error · ImportError
Anthropic package required. Install with: pip install anthro
Error message
Anthropic package required. Install with: pip install anthropic
What it means
Error "Anthropic package required. Install with: pip install anthropic" thrown in headroomlabs-ai/headroom.
Source
Thrown at headroom/evals/html_extraction.py:310
question=question,
ground_truth=ground_truth,
prediction=prediction,
)
anthropic_response = anthropic_client.messages.create(
model=self.judge_model,
max_tokens=200,
messages=[{"role": "user", "content": prompt}],
)
text = (
getattr(anthropic_response.content[0], "text", "")
if anthropic_response.content
else ""
)
return self._parse_judge_response(text)
return judge
except ImportError:
raise ImportError(
"Anthropic package required. Install with: pip install anthropic"
) from None
else:
try:
import litellm
def judge(question: str, ground_truth: str, prediction: str) -> tuple[float, str]:
prompt = HTML_JUDGE_PROMPT.format(
question=question,
ground_truth=ground_truth,
prediction=prediction,
)
response = litellm.completion(
model=self.judge_model,
messages=[{"role": "user", "content": prompt}],
temperature=0.0,
max_tokens=200,View on GitHub (pinned to 322425c43b)
Solutions
- Install the Anthropic package: pip install anthropic
- Or install the evals extra: pip install headroom-ai[evals]
When it happens
Trigger: Raised when the HTML extraction eval is configured to use an Anthropic model but the `anthropic` package is not installed.
Common situations: See trigger scenarios.
AI-assisted analysis of headroomlabs-ai/headroom@322425c43b (2026-08-15).
Data as JSON: /api/errors/3e6b3903d316bd78.
Report an issue: GitHub.