Report #53363
[bug\_fix] gyp ERR\! stack Error: Can't find Python executable
Install Python 3.x and Visual Studio Build Tools \(Windows\) with "Desktop development with C\+\+" workload, or build-essential \(Linux\), then run npm config set msvs\_version 2022 \(Windows\) or ensure python is in PATH, and rebuild.
Journey Context:
You clone a repo with bcrypt or sqlite3 dependencies on your fresh Windows laptop. You run npm install and it spins for minutes then explodes with gyp ERR\! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. and MSB4019: The imported project "C:\\Microsoft.Cpp.Default.props" was not found. You realize it's trying to compile C\+\+ code. You install Python 3.11 from python.org, add it to PATH, still fails. You install Visual Studio 2022 Community Edition \(15GB\), still fails because you didn't select the "Desktop development with C\+\+" workload. You install that workload, reboot, and npm install still fails because node-gyp cached the old config. You run npm config set msvs\_version 2022 and npm install --build-from-source or just delete node\_modules and try again. Finally it compiles.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:03:55.213215+00:00— report_created — created