28 June, 2019
Related: Fix Python 2 error Visual C++ 10.0 missing vcvarsall.bat
Fix the error for Python on Windows:
error Microsoft Visual C++ 14.0 is required
as follows. Visual Studio Studio Build Tools requires about 3 GB of disk space.
|Python version||Visual Studio|
|3.5||2015 / 2017|
|3.6, 3.7, 3.8||2017 / 2019|
In mid-2019, most people will want VS2017, as that’s what most software is compatible with. We are seeing increasing adoption of VS2019 as we go into the second half of 2019.
- Install using any ONE of these choices:
- Microsoft Build Tools for Visual Studio.
- Alternative link to Microsoft Build Tools for Visual Studio.
- Offline installer: vs_buildtools.exe
- Select: Workloads → C++ build tools.
- Install options: select only the “Windows 10 SDK” (assuming the computer is Windows 10). Optionally, if you want to use MSVC
cl.exeC/C++ compiler from the command line, additionally select the
C++ build tools, which takes an additional 2 GB disk space.
Windows Python needs Visual C++ libraries installed via the SDK to build code, such as via
numpy.distutils.core.Extension. For example, building
f2py modules in Windows with Python requires Visual C++ SDK as installed above. On Linux and Mac, the C++ libraries are installed with the compiler.
This was the former link to Microsoft Visual C++ Build Tools–no longer active:
- Python 3.6 & 3.7 Visual Studio 2017
- Python / Visual Studio build matrix
- Visual Studio changed the Build Tools from being C++ specific in late 2017