Skip to content

Windows Users: error Microsoft Visual C++ 14.0 is required #11

@mpbrown

Description

@mpbrown

Error

While using pipenv install to install Python packages, you may encounter this error:

error Microsoft Visual C++ 14.0 is required

How to fix

Visual C++ Build Tools

You'll need to

  1. Install Microsoft Visual C++ Build Tools using Visual Studio Installer.

  2. Select the C++ build tools and select components you require:

    • Important components are:
      • MSVC v142 - VS 2019 C++ x64/86 build tools...
      • Windows 10 SDK
      • C++ CMake tools
      • C++/CLI support
    • If you have already installed Build Tools for Visual Studio 2019 then open the application Visual Studio Installer then go to Visual Studio Build Tools 2019 >> Modify >> Installation Details on the right. Select the required components.
  3. Install/Modify these components for Visual Studio Build Tools 2019

  4. Restart your computer.

  5. You may also need to install or upgrade Python setuptools

    • pip install setuptools --upgrade

If for some reason these instructions don't work for your Windows configuration, more solutions can be found at this Stack Overflow post

Why

Source

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions