Fixing the 'Microsoft Visual C++ 14.0 or greater is required' Error on Windows

beginner🐍 Python2026-06-26| Windows 10/11, Python 3.6+, pip installer

Error Message

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
#pip#windows#visual-c++#python-errors

The 5-Minute Fix

If you're in a hurry, here is the most direct way to solve the problem:

  • Grab the Microsoft C++ Build Tools installer from the official download page.
  • Run vs_buildtools.exe and select the "Desktop development with C++" workload.
  • Look at the "Optional" sidebar on the right. Verify that MSVC v14x build tools and a Windows 10 or 11 SDK are selected.
  • Click Install. Expect a download of about 1.5 GB to 2 GB, which expands to roughly 4.5 GB of disk space.
  • Restart your terminal (Command Prompt or PowerShell) and try your pip install again.

Why is this happening?

You usually see this error because pip is trying to build a library from source code. Most Python packages are distributed as "Wheels" (.whl), which are pre-compiled binaries that install instantly. However, if a wheel isn't available for your specific Python version or Windows architecture, pip falls back to the original C++ source code.

Libraries like numpy, pandas, lxml, and pycocotools use C++ for speed. To turn that code into a working Python module, your system needs a compiler. Windows doesn't come with one out of the box. The "version 14.0" mentioned in the error refers to the Visual C++ 2015 runtime, though newer versions (2017, 2019, and 2022) are fully backward compatible and work perfectly.

Alternative Solutions

Method 1: Update your tools first

Before you commit to a multi-gigabyte installation, check if your packaging tools are outdated. Newer versions of pip are better at finding existing wheels. Run this command to bring everything up to date:

python -m pip install --upgrade pip setuptools wheel

Try your installation again. If a pre-compiled version exists on PyPI, pip will now grab it and skip the compilation headache entirely.

Method 2: Use Conda for Data Science

If you are tired of compiler errors, Anaconda or Miniconda is a great alternative. Unlike pip, which often compiles from source, the Conda ecosystem relies almost exclusively on pre-compiled binaries. You can install tricky packages like scikit-learn or twisted with a single command:

conda install <package_name>

Method 3: Download Pre-compiled Wheels Manually

You can sometimes bypass the build process by finding the wheel yourself. Visit PyPI.org, search for your package, and check the "Download Files" section. Look for a file matching your Python version (for example, cp311 for Python 3.11) and your OS (win_amd64). Download the .whl file and install it directly:

pip install C:\path\to\your_file.whl

Verification

After installing the Build Tools, test the fix with a package known for requiring a compiler, such as twisted:

pip install twisted

Success looks like this:

Successfully installed twisted-22.10.0

Pro-Tips for Troubleshooting

  • Restart is Mandatory: The installer modifies your system PATH. Your terminal won't see the new cl.exe compiler until you close and reopen it.
  • Check your Python Bit-version: Mixing 32-bit Python with 64-bit Build Tools (or vice versa) can cause cryptic link errors. Stick to 64-bit Python unless you have a very specific reason not to.
  • Disk Space: The full Visual Studio suite is massive. If you only need the compiler, ensure you only select the "Desktop development with C++" workload to save about 10 GB of space.

Related Error Notes