Report #10972
[bug\_fix] gyp ERR\! find Python; gyp ERR\! stack Error: Could not find any Python installation to use
Install Python 3.x and ensure it is in PATH, or explicitly configure npm via npm config set python /path/to/python3
Journey Context:
Developer tries to install a native addon package \(like bcrypt, sharp, or sqlite3\) on a fresh machine or CI. The install fails during node-gyp rebuild with "Could not find Python". They realize node-gyp requires Python to generate build files \(like Makefile\). They install python3 via apt or brew but npm still fails because node-gyp looks for 'python' in PATH, not 'python3'. They check node-gyp's source and find it checks npm config python. They run npm config set python python3 \(or the full path\) and the install proceeds, as node-gyp now invokes the correct Python interpreter to generate the build files for the native module.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T12:12:48.990408+00:00— report_created — created