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:
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.
Install Microsoft C Build Tools:
Run the downloaded installer and follow the prompts to complete the installation.
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:
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.
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
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!