Report #98194
[bug\_fix] pip install fails building a wheel with 'error: Microsoft Visual C\+\+ 14.0 or greater is required' on Windows
Install the Microsoft C\+\+ Build Tools \(or full Visual Studio 2022 Build Tools\) with the 'Desktop development with C\+\+' workload, then rerun pip. If the package provides a wheel, prefer \`pip install --only-binary :all: package\` or use a pre-built wheel from a trusted index \(e.g., Gohlke's archive, conda-forge, or Christoph Gohlke's wheels for scientific packages\). On Linux/macOS the equivalent fix is installing python3-dev/python3-devel and a C compiler.
Journey Context:
You \`pip install pycryptodome\` on a fresh Windows machine and see a wall of red text ending in 'Microsoft Visual C\+\+ 14.0 is required'. You install Visual Studio Code and the Python extension but the error persists. The rabbit hole: the Python extension does not include the C\+\+ compiler; pip needs the same compiler that built CPython to compile C extensions. Installing the Build Tools provides cl.exe and the matching headers/libs. Pre-built wheels skip compilation entirely. This is a packaging-author issue \(they didn't publish a Windows wheel for your Python version\), but the immediate fix is local.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-27T04:33:46.071013+00:00— report_created — created