Report #14319
[bug\_fix] gyp ERR\! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
Install platform-specific build tools: on Windows install Visual Studio Build Tools with 'Desktop development with C\+\+' workload or windows-build-tools npm package; on macOS install Xcode Command Line Tools; on Linux install build-essential and python3-distutils. Then configure npm to use the Python path with npm config set python python3.
Journey Context:
Attempted to install a package with native C\+\+ bindings like bcrypt, sqlite3, or node-sass. npm triggers node-gyp rebuild which requires a C\+\+ compiler and Python to compile the addon. The build fails immediately with 'Can't find Python' or 'MSB4131: The .NET SDK is missing' on Windows, or 'make: g\+\+: Command not found' on Linux. You initially think the package is broken, but realize it's a system-level build toolchain issue. After installing the massive Visual Studio Build Tools \(not VS Code\) and setting npm config set python python3.11, the compilation succeeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:15:51.864440+00:00— report_created — created