Home > Backend Development > Python Tutorial > How to Fix the 'Microsoft Visual C 14.0 or Greater Required' Error During Python Package Installation?

How to Fix the 'Microsoft Visual C 14.0 or Greater Required' Error During Python Package Installation?

DDD
Release: 2024-12-11 03:05:10
Original
1023 people have browsed it

How to Fix the

Troubleshooting "Microsoft Visual C 14.0 or Greater Required" Error during Python Package Installation

When installing Python packages, it's common to encounter the error "error: Microsoft Visual C 14.0 or greater is required." This issue arises due to the lack of the necessary Visual C Build Tools, which are essential for building and installing certain packages.

To resolve this error, follow these steps:

  1. Navigate to the Microsoft C Build Tools Website:

    Visit https://visualstudio.microsoft.com/visual-cpp-build-tools/ and download the latest Microsoft C Build Tools.

  2. Install Microsoft C Build Tools:

    Run the downloaded installer and follow the prompts to complete the installation.

  3. Ensure Latest Version is Installed:

    Verify that you have the most up-to-date version of Microsoft Visual C (e.g., 14.27 or later).

If the error persists despite installing the latest version, consider the following:

  1. Modify Microsoft Visual C Build Tools Installation:**

    Locate the Microsoft Visual C Build Tools installer and select "Modify." Ensure that the "C Compiler Build Tools" and "C Windows SDK" components are checked and installed.

  2. Alternative Installation Method:

    Follow these steps using the command line:

    vs_buildtools.exe --norestart --passive --downloadThenInstall --includeRecommended --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.MSBuildTools
    Copy after login
  3. Consult the Visual Studio Documentation:

    Refer to https://www.scivision.dev/python-windows-visual-c-14-required for additional troubleshooting guidance.

The above is the detailed content of How to Fix the 'Microsoft Visual C 14.0 or Greater Required' Error During Python Package Installation?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template