Installation and setup
DeepEval installs from PyPI as one package, deepeval, and its judged metrics need an API key for a hosted model: this course uses one free key from Groq.
Last updated: 05 Oct, 2026 · DeepEval 4.2.8
You need Python 3.10 or later. Check yours with python --version. DeepEval brings everything else the course uses with it: the openai package, which talks to Groq because Groq speaks the same API, and pytest, which runs the test files later on.
Installing DeepEval with pip, uv or Colab
pip install "deepeval==4.2.8"Install it inside a virtual environment or a uv project, so DeepEval's pinned dependencies do not clash with other projects on your machine.
Checking the installed version
import deepeval
print(deepeval.__version__)4.2.8
DeepEval sends anonymous usage data by default. Set DEEPEVAL_TELEMETRY_OPT_OUT=1 in your environment to turn it off.
Getting a Groq key
Open the Groq console, sign in, go to API Keys, create a key with a name, and copy it. The free plan needs no card. It limits how many tokens each model may use per minute and per day, which matters once a metric makes several judge calls; the judge built in Custom judge model waits and retries when it hits the minute limit.
Setting the key
export GROQ_API_KEY=gsk_...DeepEval also loads a .env.local or .env file from the current folder when it is imported. The TechNest app file in this course does not import DeepEval, so set the key in your shell as above and every file sees it.
Checking the key with a real call
The course uses two Groq models: qwen/qwen3.8-27b writes the TechNest bot's answers, and openai/gpt-oss-120b is the judge. One call to each proves the key works and both models answer.
import os
from openai import OpenAI
groq = OpenAI(api_key=os.environ["GROQ_API_KEY"], base_url="https://api.groq.com/openai/v1")
for model in ["qwen/qwen3.8-27b", "openai/gpt-oss-120b"]:
reply = groq.chat.completions.create(
model=model,
messages=[{"role": "user", "content": "Reply with the single word: ready"}],
)
print(model, "->", reply.choices[0].message.content.strip())qwen/qwen3.8-27b -> ready openai/gpt-oss-120b -> ready
- Each line is one model's reply, so
GROQ_API_KEYworks for both. base_urlpoints theopenaiclient at Groq. The rest of the call is the same as for OpenAI, which is why the judge later reuses this client.
pip vs uv vs Colab
| pip | uv | Colab | |
|---|---|---|---|
| Installs into | The active Python environment | The project's own environment | The notebook's runtime |
| Key set with | export or $env: | export or $env: | Secrets and userdata.get |
| Best for | A quick start | A project you keep | Nothing installed on your machine |
OpenAI API key is not configured when there is no OpenAI key. This course never sets one: each metric gets the Groq judge passed in as model=, as Custom judge model shows.Related
- Previous: DeepEval overview
- Next: LLM evaluation
- Reference: DeepEval quickstart
- Run the version check and confirm it prints 4.2.8.
- Change the prompt to
Reply with the single word: judgeand run the key check again. - Unset the key (
unset GROQ_API_KEY), run the key check, and read theKeyErrorit stops with.
Little by little, you're building something great.