TL;DR: oauth2client is dead upstream. Migrate the import to google-auth: service account code becomes google.oauth2.service_account, and user OAuth becomes google_auth_oauthlib.flow. Pinning oauth2client is a stopgap at best.

```text
ModuleNotFoundError: No module named 'oauth2client'
```

## Fix it

1. Find the imports: grep -rn "oauth2client" your code. Expected: a short list.
2. Service accounts: replace `from oauth2client.service_account import ServiceAccountCredentials` with `from google.oauth2 import service_account`, and ServiceAccountCredentials.from_json_keyfile_name(...) with service_account.Credentials.from_service_account_file(...). Expected: no oauth2client references left.
3. User OAuth: replace oauth2client.client.flow_from_clientsecrets with google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file. Expected: the flow completes.
4. Install the new libs: pip install google-auth google-auth-oauthlib. Expected: imports succeed.

## When this applies
- Your code or a dependency imports oauth2client.

## When it doesn't
- Modern code already uses google-auth: this error means a stale dependency; upgrade it.
- You just need it running today: pip install oauth2client works but inherits unmaintained code.

## Compatibility
- google-auth >= 1.0; Python 3.8+.

## Why it happens
Google deprecated oauth2client in 2017 and archived it. New environments never have it, so legacy samples fail on import while modern ones work.

## Edge cases
- Some old google-api-python-client versions still import oauth2client internally; upgrade google-api-python-client past 1.7.
- The credential JSON formats are compatible, so key files do not need regeneration.
