pip: Microsoft Visual C++ 14.0 or greater is required
This Windows message is “Failed building wheel” in a different coat. Nine times out of ten you do not need a compiler: you need a binary wheel, and pip did not find one.
What “14.0” actually refers to
Visual C++ 14.0 is the compiler that shipped with Visual Studio 2015. Current toolchains report themselves as 14.1, 14.2, 14.3… which is why the modern wording is “14.0 or greater”. Python extensions on Windows are built with MSVC, so pip looks for that compiler, not for MinGW or for the Visual C++ Redistributable.
The Redistributable (vcruntime140.dll and friends) lets an already-built program run. It does not compile anything. Downloading “vc_redist” from a search result will not satisfy this error.
Prefer a wheel (usually you do not need Build Tools)
- Confirm a 64-bit CPython from python.org (or the Windows Store build):
python -c "import struct; print(struct.calcsize('P') * 8)"should print64. 32-bit Python has far fewer wheels. - Upgrade pip itself:
python -m pip install -U pip. Older pip does not recognise newer Windows wheel tags and silently falls back to source. - Inspect what this interpreter will accept:
python -m pip debug --verboselists Compatible tags. You want to see tags likecp313-cp313-win_amd64matching a file on the project’s PyPI “Download files” tab. - If the version you pinned has only an sdist (a
.tar.gz), try a slightly newer or older release that includes awin_amd64.whl.
Popular packages — numpy, pandas, Pillow, lxml, cryptography, pydantic-core — publish Windows wheels for current CPython. Needing to compile them locally is a sign the tag did not match, not that Windows requires a compiler for Python in general.
If you really must compile
- Install Build Tools for Visual Studio from Microsoft’s Visual C++ Build Tools page (the official installer), not a full Visual Studio unless you already use it.
- Select the workload Desktop development with C++. That pulls in MSVC, the Windows 10/11 SDK and the C++ CMake tools. It is a large download, often several gigabytes.
- Close and reopen the terminal afterwards. If
clis still not found, open the “Developer Command Prompt for VS Build Tools” and run pip from there. - MinGW / MSYS gcc is not a drop-in replacement here: most
setup.pyfiles on Windows look for MSVC.
Another way out, if the package is only a means to an end: install it inside WSL2 (a Linux environment), where pip will usually find a manylinux wheel and never mention Visual C++.
This is the Windows-specific wording of Failed building wheel. A crash that happens before the compiler starts is metadata-generation-failed.
Related
Failed building wheel · metadata-generation-failed · Could not find a version · ResolutionImpossible · The term is not recognized (Windows PATH) · venv not activating
Questions
What does Microsoft Visual C++ 14.0 or greater is required mean in pip?
Pip tried to compile a Python package from source on Windows and could not find the MSVC compiler. Usually the real fix is to install a matching binary wheel, not a compiler.
Will installing the Visual C++ Redistributable fix it?
No. The Redistributable is a set of runtime DLLs for programs that are already compiled. You need either a wheel (preferred) or the Visual Studio Build Tools compiler workload.
Do I have to install Visual Studio?
Only if you truly need to compile. Try upgrading pip and picking a package version with a win_amd64 wheel first. If you do compile, the Build Tools installer with “Desktop development with C++” is enough; the full IDE is optional.
Why 14.0? I have a newer Visual Studio.
14.0 is the compiler version from Visual Studio 2015. Later Visual Studio releases still report a 14.x compiler, which satisfies “14.0 or greater”.
How do I see which Windows wheels pip will accept?
Run python -m pip debug --verbose and read the Compatible tags list. Then compare it with the files listed on the package’s PyPI page.
Does this happen on 32-bit Python more often?
Yes. Most current projects publish win_amd64 wheels only. A 64-bit CPython from python.org matches far more files.
Published .