python install_error ai_generated true

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/

ID: python/pip-install-requires-compiler

Also available as: JSON · Markdown · 中文
80%Fix Rate
89%Confidence
0Evidence
2024-02-05First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.8 active — — —
3.9 active — — —
3.10 active — — —
3.11 active — — —
3.12 active — — —

Root Cause

The package contains C extensions and needs a C compiler to build on Windows.

generic

中文

包包含 C 扩展,需要在 Windows 上使用 C 编译器构建。

Workarounds

  1. 95% success
    Install Microsoft C++ Build Tools from the provided URL.
  2. 80% success
    Use a pre-built wheel if available: `pip install --only-binary :all: foo`.

Dead Ends

Common approaches that don't work:

  1. 90% fail

    Forces source build, which still needs a compiler.

  2. 95% fail

    Installation will fail.