'npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
I am stuck at this for long, checked several post but no solution. I am trying to deploy firebase functions.
I have run, npm install -g firebase-tools, npm firebase login, firebase init functions, and when i get to npm install i see this issue with python on terminal
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if Python is C:\Users\Osas Divine\AppData\Local\Programs\Python\Python39\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\Osas Divine\AppData\Local\Programs\Python\Python39\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\Osas Divine\AppData\Local\Programs\Python\Python39-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\Osas Divine\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run
I have removed python from my pc, all i simply want is to deploy firebase but these errors are confusing and no progress, i dont need python how do i stop terminal from running it
This is my package.json
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"lint": "eslint .",
"serve": "firebase serve --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"dependencies": {
"firebase-admin": "^9.8.0",
"firebase-functions": "^3.14.1",
"@google-cloud/storage": "^0.4.0",
"sharp": "^0.18.1"
},
"devDependencies": {
"eslint": "^4.12.0",
"eslint-plugin-promise": "^3.6.0"
},
"private": true
}
Solution 1:[1]
The error reported is due to missing or unavailable python
installation for your OS.
One the packages listed in your package.json
file requires python
, so you need to install Python for Windows and when you are ready you must make node aware of its existence by (replace the file path to your python installation, you can use python3 or what is required by the referenced node package):
npm config set python D:\Library\Python\Python27\python.exe
Solution 2:[2]
Install python for windows simply by typing python
on the command line.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Plamen Nikolov |
Solution 2 | Stuart Schechter |