Either a file named `seleniumwire.py` in your working directory is shadowing the package, or the install is damaged. Check with `python -c "import seleniumwire; print(seleniumwire.__file__)"`: a project path means rename your file (and clear `__pycache__`); a site-packages path means `python -m pip install --force-reinstall selenium-wire`.

## The error

```text
ImportError: cannot import name 'webdriver' from 'seleniumwire'
```

## Fix it

1. **Find what got imported**

```
python -c "import seleniumwire; print(seleniumwire.__file__)"
```
Expected: a site-packages path. A project path ending in `seleniumwire.py` is a shadowing file.

2. **If shadowed, rename your file**

Rename `seleniumwire.py` to something else, delete `__pycache__`, then:
```
python -c "from seleniumwire import webdriver; print('ok')"
```
Expected: prints `ok`.

3. **If not shadowed, reinstall**

```
python -m pip install --force-reinstall selenium-wire
```
Expected: the import from step 2 now works. A partial install can leave the package directory without the webdriver module.

## When this applies

- `from seleniumwire import webdriver` raises ImportError naming `webdriver`
- selenium-wire is installed but the name is missing

## When it does NOT apply

- `No module named 'seleniumwire'` means nothing is installed (note the pip name has a dash: `selenium-wire`)
- `cannot import name 'webdriver' from 'selenium'` is plain selenium's shadowing trap, different package

## Compatibility

selenium-wire 5.x. The documented import is `from seleniumwire import webdriver` (no dash in the module name).

## Why it happens

Two candidates, same as every package: a local `seleniumwire.py` shadowing the installed package (script directory beats site-packages), or a damaged install missing the webdriver submodule. The `__file__` check distinguishes them in one command.

## Edge cases

- selenium-wire also ships `seleniumwire.undetected_chromedriver`. If THAT import fails instead, the undetected-chromedriver companion package is missing.
- Do not `pip install seleniumwire` (no dash). The PyPI name is `selenium-wire`.
