## TL;DR
The class name is `TavilyClient` with capital T and C. Write `from tavily import TavilyClient` and the import works.

```text
from tavily import tavilyclient
```

## Use this when
- Python raises `ImportError: cannot import name 'tavilyclient' from 'tavily'`.
- You are wiring the Tavily search API into a script or agent.
- You followed an example that used the old lowercase client name.

## Not for this skill when
- The error is about the `tavily` package not being installed at all. That is a pip install problem, not an import-name problem.
- You call the Tavily REST API directly with requests. No client class needed.

## Steps
1. Confirm the exact error: run the import in a REPL. Expected: `ImportError: cannot import name 'tavilyclient'`.
2. Replace the import line with `from tavily import TavilyClient`. Verify: the import succeeds with no error.
3. Instantiate the client: `client = TavilyClient()`. It reads TAVILY_API_KEY from the environment automatically. Verify: `type(client).__name__` prints `TavilyClient`.
4. Make a test call: `client.search("test query", max_results=1)`. Verify: the response dict contains a `results` list.

## Variant phrasings
### cannot import name tavilyclient
Same fix. The name on the package is TavilyClient.
### tavily python client import error
Covers the general search for this failure.
### ImportError tavily
Short form of the same failure.

Compatibility: tavily-python 0.3+. Older 0.2.x versions exported a lowercase client; pin or upgrade before changing the import.

## Why it happens
Early tavily-python versions exported a lowercase `tavilyclient` class. The package renamed it to the PEP-8 style `TavilyClient` in 0.3.x, and examples copied from old docs or old forum posts still use the lowercase name, which no longer exists in the package.

## Edge cases / pitfalls
- A file named `tavily.py` in your working directory shadows the installed package. Rename the file.
- Virtualenvs with a stale 0.2.x install keep exporting the old name. Run `pip show tavily` and upgrade.
- Read the key from the environment or a secret store. Never paste it into the script or print it.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_g3Aj20z-PJ_lG7f_5_JCmA
