## TL;DR

serpapi.Client(api\_key value...) raises AttributeError: module 'serpapi' has no attribute 'Client' even though the package is installed (serpapi 1.0.2).

```text
AttributeError: module 'serpapi' has no attribute 'Client'
```

## Steps

1. `serpapi.Client(api_key value ...)` raises `AttributeError: module 'serpapi' has no attribute 'Client'` even though the package is installed (serpapi 1.0.2). The same request works via cURL. The environment also had `google-search-results==2.4.2` in requirements.txt.

2. SerpApi ships two Python packages that collide: the old deprecated `google-search-results` and the new recommended `serpapi`. Having both installed shadows the new `Client` class. Fix: `pip uninstall google-search-results`, remove `google-search-results==2.4.2` from requirements.txt, and keep only `serpapi==1.0.2` (install with `pip install serpapi`). The reporter confirmed the code runs correctly after removing the old package.

## When to use

You are seeing this: The same request works via cURL. Use this skill when you run into "AttributeError: module 'serpapi' has no attribute 'Client'".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

Versions mentioned in the source: serpapi 1.0.2, google-search-results 2.4.2. If you are on something much newer or older, the details may have shifted.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
