Report #88777
[bug\_fix] gyp ERR\! stack Error: Can't find Python executable 'python', you can set the PYTHON env variable. gyp ERR\! stack Error: \`gyp\` failed with exit code: 1
Install platform-specific build tools: On Windows, install windows-build-tools via npm or Visual Studio Build Tools with 'Desktop development with C\+\+' workload; on macOS, install Xcode Command Line Tools \(xcode-select --install\); on Linux, install build-essential, python3, and make. Then run npm rebuild or delete node\_modules and reinstall.
Journey Context:
Developer on Windows 10 clones a repository using bcrypt for password hashing or node-sass for styles. They run npm install and it fails during the postinstall script with node-gyp errors about missing Python 2.7 or Visual Studio. They try installing Python 3 from python.org but gyp still fails because it needs the specific node headers and C\+\+ compiler. They search StackOverflow and find they need windows-build-tools. They run npm install --global windows-build-tools but that hangs or fails on Windows 10/11. Eventually they install Visual Studio Build Tools 2022 with the 'Desktop development with C\+\+' workload and the 'MSVC v143 - VS 2022 C\+\+ x64/x86 build tools' component. After that, npm install works because node-gyp finds cl.exe and the Python 3 they installed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:35:58.432171+00:00— report_created — created