Home > Backend Development > Python Tutorial > How to Fix the 'error: Microsoft Visual C 14.0 or greater is required' Python Installation Error?

How to Fix the 'error: Microsoft Visual C 14.0 or greater is required' Python Installation Error?

Susan Sarandon
Release: 2024-12-09 00:57:13
Original
541 people have browsed it

How to Fix the

Troubleshooting "error: Microsoft Visual C 14.0 or greater is required" While Installing Python Packages

When attempting to install Python packages, you may encounter the error: "error: Microsoft Visual C 14.0 or greater is required." This error signifies that your system lacks the necessary C runtime dependencies required by the package installation.

Resolution:

To resolve this issue, follow these steps:

  1. Visit the Microsoft C Build Tools download page (https://visualstudio.microsoft.com/visual-cpp-build-tools/).
  2. Download and install Microsoft C Build Tools.
  3. Open the installer and follow the prompts.

If updating through the installer doesn't resolve the issue, try the following:

  1. Open the installer and click "Modify".
  2. Ensure that "Windows 10 SDK" and "C x64/x86 build tools" are selected under "Individual Components".
  3. Install the selected components.

Additional Tips:

  • Ensure that you have the latest version of Python installed.
  • If the above steps do not resolve the issue, check that your system's path variable includes the path to the C build tools.
  • You can also try reinstalling Python after installing the C runtime.

UPDATE: December 28, 2020

Alternatively, you can use the following command to automate the installation of the necessary components:

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

For more information, refer to: https://www.scivision.dev/python-windows-visual-c-14-required

The above is the detailed content of How to Fix the 'error: Microsoft Visual C 14.0 or greater is required' Python Installation Error?. 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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template