PlainError

gyp ERR! find Python | gyp ERR! stack Error: Could not find any Python installation to use

Last checked 2026-11-16 · 3 fixes · reviewed answer

TL;DRThis error occurs during npm install or similar when a Node.js package needs to compile native code using node-gyp. The gyp tool cannot locate a Python installation on your system, which it requires for the build process.

Most likely cause: Python is not installed on the computer

Try first: Check for Python (python --version)

Likely causes

  1. Python is not installed on the computermost likely
  2. Python is installed but not added to the PATH environment variablepossible

How to fix it

Safest first: SafeChanges settingsDangerous
  1. Check for PythonSafe

    Open a terminal or command prompt and run the command below to see if Python is detected.

    python --version
  2. Verify PATH after installSafe

    Restart your terminal and run the check command again to confirm Python is now found.

    python --version
  3. Install Python if missingChanges settings

    Download and install Python from the official website, making sure to check the option to add Python to PATH during setup.

If that didn't fix it

Point node-gyp at your Python directly: set the PYTHON environment variable to the full path of python (or python.exe on Windows), or run npm install --python=/path/to/python. Note that "npm config set python" no longer works on npm 9 and later. If it then fails with a compiler error, install the C++ build tools (Visual Studio Build Tools "Desktop development with C++" on Windows, build-essential on Linux, Xcode Command Line Tools on macOS).

When to see a technician

Consult a developer if you are unsure about installing Python or editing environment variables for your project.

Quick answers

What does gyp ERR! find Python | gyp ERR! stack Error: Could not find any Python installation to use mean?
This error occurs during npm install or similar when a Node.js package needs to compile native code using node-gyp. The gyp tool cannot locate a Python installation on your system, which it requires for the build process.
What causes gyp ERR! find Python | gyp ERR! stack Error: Could not find any Python installation to use?
Python is not installed on the computer. (most likely) Python is installed but not added to the PATH environment variable. (possible)
How do I fix gyp ERR! find Python | gyp ERR! stack Error: Could not find any Python installation to use?
Try these in order, safest first: 1. Check for Python. 2. Verify PATH after install. 3. Install Python if missing.
What if that didn't fix it?
Point node-gyp at your Python directly: set the PYTHON environment variable to the full path of python (or python.exe on Windows), or run npm install --python=/path/to/python. Note that "npm config set python" no longer works on npm 9 and later. If it then fails with a compiler error, install the C++ build tools (Visual Studio Build Tools "Desktop development with C++" on Windows, build-essential on Linux, Xcode Command Line Tools on macOS).
When should I see a technician?
Consult a developer if you are unsure about installing Python or editing environment variables for your project.
Did this fix it? Report a problem

Related errors

All Coding errors →