ModuleNotFoundError: No module named 'seleniumwire'
Fixes the plain missing-module error for selenium-wire. Use when `from seleniumwire import webdriver` fails with ModuleNotFoundError naming seleniumwire. Not for the webdriver name import failure (installed but damaged).
selenium-wire is not installed in the running Python. The PyPI name is selenium-wire (with a dash) but the import is seleniumwire (no dash). Run python -m pip install selenium-wire and the import works.
The error
ModuleNotFoundError: No module named 'seleniumwire'Fix it
- Install selenium-wire
python -m pip install selenium-wireExpected: Successfully installed selenium-wire-....
- Confirm
python -c "from seleniumwire import webdriver; print('ok')"Expected: prints ok.
When this applies
- any seleniumwire import fails naming
seleniumwire - a fresh env for request-intercepting automation
When it does NOT apply
cannot import name 'webdriver' from 'seleniumwire'means it IS installed but shadowed or damaged- the Visual C++ Redist ImportError is the Windows compiled-dependency problem
Compatibility
selenium-wire 5.x. Needs selenium 4 and Python 3.8+.
Why it happens
The package was never installed into the active interpreter, and the dash/no-dash split between the PyPI name and the module name makes pip install seleniumwire (no dash) fail, so people sometimes stall at the install step itself.
Edge cases
pip install seleniumwire(no dash) does not exist on PyPI. The dash form is the only one.- selenium-wire 5.x requires selenium 4. If pip downgrades your selenium to satisfy it, that is expected.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.