Back to Cookbook
Fix "Microsoft Visual C++ 14.0+ Required" for Python Installs
Unblock pip installs that trigger native compilation on Windows.
Many scientific Python packages still require native compilation on Windows when wheels are unavailable; this recipe turns the "install build tools" advice into a reproducible checklist.
CommunitySubmitted by CommunityWork15 min
INGREDIENTS
🔍Web
PROMPT
You are OpenClaw. Ask for the package name/version, Python version, and full pip log. Determine whether a wheel should exist; if not, guide the user through installing MSVC Build Tools and verifying the compiler. Provide fallback strategies (conda-forge wheels, pinning Python, or using prebuilt binaries).
Pain point
pip fails with "Microsoft Visual C++ 14.0 or greater is required" when building wheels from source.
Repro/diagnostic steps
- Capture the full pip error (look for "Failed building wheel" / "build_ext" sections).
- Check Python version and whether a prebuilt wheel exists for that package + version.
Root causes (common)
- No wheel available for your Python version/architecture (pip falls back to building from source).
- MSVC Build Tools not installed or incomplete.
- Toolchain mismatch (SDK headers, compiler version, PATH issues).
Fix workflow
- Prefer installing packages with wheels (pin Python to a version supported by wheels if needed).
- Install Visual Studio Build Tools with "Desktop development with C++" workload.
- Re-run pip with a clean build cache, capture logs, and confirm the compiler is detected.
Expected result
- pip installs succeed without build_ext failure, or you choose an alternate Python/package version that has wheels.
References
- https://stackoverflow.com/questions/64261546/how-to-solve-error-microsoft-visual-c-14-0-or-greater-is-required-when-inst
- https://learn.microsoft.com/en-us/answers/questions/419525/microsoft-visual-c-14-0-or-greater-is-required
- https://github.com/pypa/setuptools/issues/2214
Tags:#windows#python#build#packaging