The message
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ … ERROR: Failed building wheel for insightface
Affects: Python, ComfyUI, AUTOMATIC1111 Stable Diffusion WebUI, Stable Diffusion WebUI Forge, TextGen (text-generation-webui), Coqui TTS (Idiap fork) with XTTS-v2
Why is this happening?
Some packages (for example insightface for Face-Swap nodes) contain C/C++ code. If there is no prebuilt package (wheel) for your Python version, pip compiles it itself and needs the Microsoft C++ Build Tools for that. This happens especially often with very new Python versions.
How to fix it
- Check whether you’re using the Python version recommended by the program. With a suitable version, there is often a prebuilt wheel and you don’t need a compiler at all.
- Download the Build Tools from https://visualstudio.microsoft.com/visual-cpp-build-tools/ ("Download Build Tools") and start vs_BuildTools.exe.
- In the Visual Studio Installer, select the workload "Desktop development with C++". Keep the current MSVC build tools and the Windows SDK checked, then click "Install". Plan for at least 6 GB of disk space.
- Restart your PC after installation.
- Activate your program’s venv and update the build tools:
python -m pip install --upgrade pip setuptools wheel. - Repeat the original pip command.
Better not: The "Microsoft Visual C++ Redistributable" is not enough; you need the Build Tools. Also do not install precompiled wheels from unknown sites.
Set up from scratch again
If it still doesn’t work after that, a fresh setup step by step often helps:
- Set up and maintain ComfyUI on Windows
Desktop or Portable, where the models belong, sharing models with other programs, safely installing custom nodes, updates, startup options … - Your First Image with ComfyUI
Install Comfy Desktop, learn the interface, and create your first AI image with FLUX.2 [small] 4B or Z-Image Turbo. - Your First AI Video with LTX in ComfyUI
Use LTX-2.3 in ComfyUI to create short videos with sound from text or an image. Template, files, settings, and license.
Terms for this
Similar errors
- ImportError: DLL load failed while importing …: The specified module could not be found – a Python package is missing a Windows DLL
- No matching distribution found for torch (wrong Python version)
- 'python' is not recognized or opens the Microsoft Store
- ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied – pip cannot modify a file
- Path too long: Filename too long / Windows Long Path support
Sources
- https://www.pythondiscord.com/pages/tags/microsoft-build-tools/
- https://learn.microsoft.com/en-us/answers/questions/136595/error-microsoft-visual-c-14-0-or-greater-is-requir
- https://wiki.python.org/moin/WindowsCompilers
Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.