Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gyp ERR! stack Error: Can't find Python executable

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
like image 213
Danil Zinchenko Avatar asked Apr 29 '19 17:04

Danil Zinchenko


3 Answers

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

like image 113
Reed Dunkle Avatar answered Sep 18 '22 09:09

Reed Dunkle


It looks like you need to download python 2.7 to continue at python.org

like image 32
Parkofadown Avatar answered Sep 20 '22 09:09

Parkofadown


I you use the high version of Node. Try to downgrade .

like image 24
alan9uo Avatar answered Sep 19 '22 09:09

alan9uo