ImportError: You need to install Visual C++ Redist
Fixes the Windows-only selenium-wire startup failure demanding the Visual C++ Redistributable. Use when importing (or launching) raises `ImportError: You need to install Visual C++ Redist`. Not for missing seleniumwire.
On Windows, one of selenium-wire's compiled dependencies needs the Visual C++ Redistributable runtime and it is not on the machine. Download the latest x86 AND x64 redistributables from Microsoft, install both, then re-run. This is a system prerequisite, not a Python package problem, so no pip command fixes it.
The error
ImportError: You need to install Visual C++ RedistFix it
- Install the Visual C++ Redistributables (both architectures)
Download from the official Microsoft support page for the latest Visual C++ downloads and install the x86 and the x64 redistributables. Expected: both installers complete successfully. A reboot is sometimes needed before the DLLs register.
- Re-run your script
python -c "from seleniumwire import webdriver; print('ok')"Expected: prints ok with no ImportError.
- If it persists, refresh the environment
Delete and recreate the virtualenv (the issue thread notes stale env folders keep the failure), then reinstall requirements. Expected: the import works in the clean env once the redist is present.
When this applies
- the ImportError literally tells you to install Visual C++ Redist
- you are on Windows running an app that bundles selenium-wire (e.g. TwitchDropsMiner)
- a fresh Windows machine or a new user account
When it does NOT apply
- macOS/Linux never produce this error
No module named 'seleniumwire'is the missing installDLL load failedwithout this message is a different binary problem
Compatibility
Windows-only. The compiled dependency needing the CRT ships with selenium-wire's dependency tree on Windows.
Variant phrasings
ImportError: You need to install Visual C++ Redist (x86 and x64): [url]
The full message with the Microsoft download link. Same fix: install both architectures.
Why it happens
Some of selenium-wire's Windows dependencies ship compiled extension modules linked against the Visual C++ runtime. That runtime is not part of Windows itself; most dev machines have it incidentally (installed by other software), but clean machines do not, so the import fails with this explicit message instead of a cryptic DLL error.
Edge cases
- Install BOTH x86 and x64. Installing only the one matching your OS is the most common reason the fix appears not to work.
- Portable/no-install Python distributions do not register the CRT for you. The redist install is still required.
- If corporate policy blocks the installer, you cannot work around this from pip. It needs admin or the IT-packaged redist.
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.