Last modified: Oct 01, 2026

Fix Microsoft Visual C++ 14.0 Required Error

You try to install a Python package. Suddenly, a red error appears. It says "Microsoft Visual C++ 14.0 is required". This is a common problem on Windows.

The good news is simple. You can fix it in a few minutes. This guide explains why it happens and how to solve it step by step.

What Causes This Error?

Many Python packages contain C or C++ code. Your computer must compile this code during installation. On Windows, the compiler needs the Microsoft Visual C++ Build Tools.

If these tools are missing, pip cannot build the package. So it stops and shows the error. This often happens with packages like numpy, pandas, or scrapy.

Here is a typical error message you may see:


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/

This message is not a bug in your code. It is a missing tool on your system.

Option 1: Install Microsoft C++ Build Tools

This is the official and most reliable fix. Follow these steps carefully.

Step 1: Go to the official Microsoft Build Tools page. Search for "Microsoft C++ Build Tools" in your browser.

Step 2: Download the installer. Run it on your computer.

Step 3: In the installer, check the box for "Desktop development with C++". This is very important.

Step 4: Click install. The download is large, so it may take some time. Wait until it finishes.

Step 5: Restart your computer. Then try your Python command again.


pip install numpy

If the installation completes without errors, the problem is solved.

Option 2: Use Prebuilt Wheels

Sometimes you do not need a compiler at all. Many packages offer prebuilt versions called wheels. A wheel is a ready-to-use package.

First, upgrade pip to the newest version. Newer versions prefer wheels over source code.


python -m pip install --upgrade pip

Then try installing your package again. If a wheel exists, pip will use it. No compiler is needed.


pip install pandas

This method often works for popular packages. It is the fastest solution when available.

Option 3: Install Visual Studio Community

The full Visual Studio Community edition also includes the needed tools. It is free for personal use.

Download it from the official Microsoft website. During setup, select "Desktop development with C++".

This option is heavier than Build Tools. But it gives you a complete development environment. Choose it if you plan to write C++ code too.

Option 4: Check Your Python Version

Your Python version matters. Very old versions may cause extra problems. Use Python 3.8 or newer for best results.

You can check your version with this command:


python --version

The output looks like this:


Python 3.11.4

If your version is old, update Python first. Then retry the package install.

Option 5: Use Conda Instead of Pip

Conda is another package manager. It often provides prebuilt binaries. This means no compiler is required.

Install your package with conda like this:


conda install numpy

Conda handles dependencies well. It is a great choice for data science packages. If pip keeps failing, try conda.

Common Mistakes to Avoid

Many users make small mistakes. Avoid these to save time.

First, do not skip the "Desktop development with C++" checkbox. Without it, the tools are not installed.

Second, always restart your terminal after installing tools. The system needs to reload the paths.

Third, do not install random files from unknown websites. Only use official Microsoft sources.

Quick Summary Table

Here is a simple overview of your options:


Option 1: Install C++ Build Tools      -> Best official fix
Option 2: Use prebuilt wheels          -> Fastest fix
Option 3: Install Visual Studio        -> Full IDE fix
Option 4: Update Python version        -> Avoid old issues
Option 5: Use Conda                    -> Alternative manager

Start with Option 1 if you want a permanent solution. Try Option 2 if you need a quick fix.

Why This Error Is So Common

Windows does not include a C++ compiler by default. Linux and macOS usually have one built in. This is why Windows users see this error more often.

The Python community knows this issue well. Many projects now publish wheels for Windows. This reduces the problem over time.

Still, some packages require compilation. Knowing how to fix this error is a useful skill.

Testing Your Fix

After applying a fix, test it. Create a small Python file and run it.


# test_install.py
# This script checks if numpy works correctly

import numpy as np

# Create a simple array
arr = np.array([1, 2, 3, 4, 5])

# Print the array and its sum
print("Array:", arr)
print("Sum:", arr.sum())

Run the file with this command:


python test_install.py

If everything works, you will see this output:


Array: [1 2 3 4 5]
Sum: 15

This confirms that the package installed and runs correctly.

Tips for Beginners

Read error messages carefully. They often tell you exactly what is missing.

Keep your tools updated. New versions fix many old problems.

Use a virtual environment for each project. This keeps your system clean.


python -m venv myenv
myenv\Scripts\activate

This creates and activates a virtual environment on Windows. Then install your packages inside it.

Conclusion

The "Microsoft Visual C++ 14.0 is required" error looks scary. But it is easy to fix. The main cause is a missing C++ compiler on Windows.

Install the Microsoft C++ Build Tools for a permanent fix. Or use prebuilt wheels for a quick solution. Conda is another strong option.

Follow the steps in this guide. Restart your terminal. Test your install. In most cases, the error disappears fast.

Now you can install Python packages without stress. Happy coding!