Fix Python 3 on Windows error Microsoft Visual C++ 14.0 is required

less than 1 minute read

Related: Fix Python 2 error Visual C++ 10.0 missing vcvarsall.bat


Fix the error for Python 3.5, 3.6 and 3.7 on Windows

error Microsoft Visual C++ 14.0 is required

as follows. It requires about 6 GB of disk space (for VS C++ 2015 or 2017).

  1. Download and Install Microsoft Visual C++ Build Tools 2015.
  2. Install options: select the appropriate “Windows SDK”:

    Windows OS SDK
    Windows 7 Windows 8.1
    Windows 8.1 Windows 8.1
    Windows 10 Windows 10

Visual C++ 2017

For Python 3.7, you can instead:

  1. Install Microsoft Build Tools for Visual C++ 2017.
  2. Customize install → Workloads → Visual C++ build tools.

Notes

Python version Visual Studio
2.7, 3.4 2010
3.5, 3.6 2015
3.7 2015 (14.0) or 2017 (14.1)

Why Visual C++?

Windows Python needs Visual C++ libraries installed via the SDK to build code, such as via setuptools.extension.Extension or 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.

Notes

This was the former link to Microsoft Visual C++ Build Tools: https://landinghub.visualstudio.com/visual-cpp-build-tools

  • Python Visual C++ requirements
  • Python 3.7 Visual Studio 2017
  • Python / Visual Studio build matrix (link down) http://vstinner.readthedocs.io/cpython_windows.html

Leave a Comment