Report #10466
[bug\_fix] error: Microsoft Visual C\+\+ 14.0 or greater is required. Get it with 'Microsoft C\+\+ Build Tools' \(or similar distutils.errors.DistutilsPlatformError\)
Install the Microsoft C\+\+ Build Tools \(specifically the 'Desktop development with C\+\+' workload\) from the official Microsoft site, or switch to a pre-built wheel \(e.g., install psycopg2-binary instead of psycopg2, or ensure pip is upgraded to find compatible wheels\).
Journey Context:
Developer on Windows runs pip install pyyaml \(or any package with C extensions without a pre-built wheel for their specific Python version, e.g., Python 3.11 on Windows arm64\). The build starts but fails with the Microsoft Visual C\+\+ 14.0 error. The developer tries installing Visual Studio Community but doesn't select the C\+\+ workload, so it still fails. They realize that the error specifically requires the MSVC compiler toolchain that is not installed by default with Python on Windows \(unlike Linux gcc\). The fix works because installing the Build Tools provides the cl.exe compiler and headers needed to compile the C extension from source. Alternatively, using a binary wheel \(manylinux, win\_amd64\) avoids the need for a compiler entirely, which is why upgrading pip helps find the correct wheel for the platform.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T10:47:16.988728+00:00— report_created — created