Report #15738
[bug\_fix] gyp ERR\! stack Error: Can't find Python executable "python", you can set the PYTHON env variable
Install the Visual Studio Build Tools \(Windows\) or Xcode Command Line Tools \(macOS\), ensure Python 3.x is in the system PATH, and configure npm to use the correct Visual Studio version: \`npm config set msvs\_version 2022\` \(or 2019\).
Journey Context:
A developer on Windows 11 clones a repository using \`bcrypt\` for password hashing. Running \`npm install\` fails with a wall of red text from \`node-gyp\` stating it cannot find Python, despite Python being installed from the Microsoft Store. The developer installs Python 3.11 from python.org and adds it to PATH manually. The error changes to \`gyp ERR\! find VS missing VS2019/2022\`. The developer installs Visual Studio Community Edition with the "Desktop development with C\+\+" workload \(several gigabytes\). The error persists because \`node-gyp\` defaults to looking for VS2017. The developer finally discovers \`npm config set msvs\_version 2022\` and \`npm config set python python3\`. Running \`npm install\` again now successfully compiles the native bcrypt binary.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T00:51:56.245777+00:00— report_created — created