gyp ERR! stack Error: Can't find Python executable
17,662
Solution 1
The node-gyp
installation instructions provide two options to get all of their necessary dependencies, including Python 2.
Option 1
Install all the required tools and configurations using Microsoft's windows-build-tools using
npm install --global --production windows-build-tools
from an elevated PowerShell or CMD.exe (run as Administrator).
npm install --global --production windows-build-tools
Option 2 is to install them manually, individually. Read everything here: https://github.com/nodejs/node-gyp#on-windows
Solution 2
It looks like you need to download python 2.7 to continue at python.org
Solution 3
I you use the high version of Node. Try to downgrade .
Related videos on Youtube
Author by
Danil Zinchenko
Updated on June 04, 2022Comments
-
Danil Zinchenko over 1 year
I've removed node-modules, reinstall it, tried to install npm install --global node-gyp, cleaned force cache and other
error C:\Users\danil\work\cryptobetting\node_modules\sha3: Command failed. Exit code: 1 Command: node-gyp rebuild Arguments: Directory: C:\Users\danil\work\cryptobetting\node_modules\sha3 Output: gyp info it worked if it ends with ok gyp info using [email protected] gyp info using [email protected] | win32 | x64 gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "C:\Programs\Python2.7\python2.7.exe", you can set the PYTHON env variable. gyp ERR! stack at PythonFinder.failNoPython (C:\Users\danil\work\cryptobetting\node_modules\node-gyp\lib\configure.js:484:19) gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\danil\work\cryptobetting\node_modules\node-gyp\lib\configure.js:509:16) gyp ERR! stack at C:\Users\danil\work\cryptobetting\node_modules\graceful-fs\polyfills.js:282:31 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21) gyp ERR! System Windows_NT 10.0.17134 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\danil\\work\\cryptobetting\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\danil\work\cryptobetting\node_modules\sha3
-
DaveG over 4 yearsHave you looked at the error msg in the stack trace Error: Can't find Python executable "C:\Programs\Python2.7\python2.7.exe", you can set the PYTHON env variable.
-
-
Danil Zinchenko over 4 yearswhat do i need to do after that?
-
Parkofadown over 3 yearsre-run your file
-
pseudozach about 2 yearsthis resolved it for me. I was having issue with
v16.9.1
, I downgraded tov14.17.3
and no more error.