Report #20767
[bug\_fix] gyp ERR\! find Python Could not find any Python installation to use / gyp ERR\! find VS msvs\_version not set from command line or npm config / gyp: No Xcode or CLT version detected
Install platform-specific C\+\+ build tools: On Windows - Visual Studio Build Tools with 'Desktop development with C\+\+' workload; On macOS - Xcode Command Line Tools via xcode-select --install; On Linux - build-essential and python3-dev. Then configure npm: npm config set python python3.
Journey Context:
Developer clones a project using bcrypt, sqlite3, sharp, or node-sass \(native Node.js addons with C\+\+ bindings\). They run npm install. The install proceeds until hitting the native module, then spews verbose errors about 'Could not find any Python installation to use' \(even if Python 3 is installed but not in PATH or named 'python3'\), or on Windows 'MSBuild not found' / 'msvs\_version not set', or on macOS 'gyp: No Xcode or CLT version detected'. The developer learns that node-gyp \(Node's native build tool\) requires Python 3 and a C\+\+ compiler toolchain to compile the addon's C/C\+\+ source against Node's V8 headers. On Windows, they must download Visual Studio Build Tools 2022 and select the 'Desktop development with C\+\+' workload \(or windows-build-tools npm package on older setups\). On macOS, running xcode-select --install installs the necessary compilers and headers. On Linux, they install build-essential, python3, and python3-dev. After installing these and ensuring python3 is accessible \(or configured via npm config set python python3\), npm install successfully compiles the native addon.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:16:28.542031+00:00— report_created — created