Skip to content

Fixed Python3 on Windows 10 error Visual C++ 14.0 is required

  • by

Fix the “Microsoft Visual C++ 14.0 is required” error. (Old post republished)

When I tried to use python3 to compile and install a module on Windows 10 vim cmd:

python setup.py install

it showed an error:

error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”: https://visualstudio.microsoft.com/downloads/

After googling, I found an article1 explaining how to fix the issue but with one correction.

As it1 describes:

  1. Install using Microsoft Build Tools for Visual Studio 2019.
  2. Select: Workloads → C++ build tools.
  3. Install options: select only the “Windows 10 SDK” (assuming the computer is Windows 10). Optionally, if you want to use MSVC cl.exe C/C++ compiler from the command line, additionally select the MSVC 2019 C++ build tools, which takes an additional 1.5 GB disk space …

Actually, the MSVC 2019 C++ build tools is not optional but required, if you try to compile and install a module via python cmd as I did. After installing both SDK and MSVC, the above cmd runs without any problem.

I understand that the MSVC 2019 C++ build tools installs a C++ compiler on Windows, like the popular gcc compiler on Linux.

Leave a Reply

Your email address will not be published. Required fields are marked *