1

I'am trying to run npm i command on my project but its showing an error can't find python executable python. you can set python env variable. Please any one help me on this. Great thanks in advance.

gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\node\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\node\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack     at C:\node\node_modules\npm\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\node\\node.exe" "C:\\node\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\vks\\prok\\vk\\node_modules\\sqlite3\\lib\\binding\\node-v64-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\Users\\vks\\prok\\vk\\node_modules\\sqlite3\\lib\\binding\\node-v64-win32-x64" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd C:\Users\vk\prok\node_modules\sqlite3
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\node\node.exe C:\node\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\vks\prok\vk\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\vks\prok\vk\node_modules\sqlite3\lib\binding\node-v64-win32-x64 --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\vks\prok\vk\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Windows_NT 10.0.15063
node-pre-gyp ERR! command "C:\\node\\node.exe" "C:\\Users\\vks\\prok\\vk\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\vks\prok\vk\node_modules\sqlite3
node-pre-gyp ERR! node -v v10.16.3
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\node\node.exe C:\node\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\vks\prok\vk\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\vks\prok\vk\node_modules\sqlite3\lib\binding\node-v64-win32-x64 --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
npm WARN [email protected] requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\vk\AppData\Roaming\npm-cache\_logs\2019-09-16T05_11_44_737Z-debug.log

Right now im getting this error on my system

1304 warn [email protected] requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
1305 warn [email protected] No repository field.
1306 warn [email protected] No license field.
1307 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
1308 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
1309 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
1309 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
1309 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   win32
1309 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
1310 verbose stack Error: [email protected] install: `node-pre-gyp install --fallback-to-build`
1310 verbose stack Exit status 1
1310 verbose stack     at EventEmitter.<anonymous> (C:\Users\\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
1310 verbose stack     at EventEmitter.emit (events.js:159:13)
1310 verbose stack     at ChildProcess.<anonymous> (C:\Users\\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
1310 verbose stack     at ChildProcess.emit (events.js:159:13)
1310 verbose stack     at maybeClose (internal/child_process.js:943:16)
1310 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
1311 verbose pkgid [email protected]
1312 verbose cwd C:\Users\test\
1313 verbose Windows_NT 10.0.15063
1314 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "--verbose"
1315 verbose node v9.3.0
1316 verbose npm  v6.11.3
1317 error code ELIFECYCLE
1318 error errno 1
1319 error [email protected] install: `node-pre-gyp install --fallback-to-build`
1319 error Exit status 1
1320 error Failed at the [email protected] install script.
1320 error This is probably not a problem with npm. There is likely additional logging output above.
1321 verbose exit [ 1, true ]

I have node version 9.3.0 and npm version 6.11.3 on my system

2 Answers 2

2

In My case, the issue was because of the Python version. I was having Python39 but the dependencies which I was trying to install require Python27. When I installed Python27 the issue got resolved automatically.

Sign up to request clarification or add additional context in comments.

Comments

0

please set Python path in windows :

---For Windows 10/8/7:

  • Open System Properties (Right click Computer in the start menu, or use the keyboard shortcut Win+Pause)
  • Click Advanced system settings in the sidebar.
  • Click Environment Variables...
  • Select PATH in the System variables section
  • Click Edit
  • Add Python's path to the end of the list (the paths are separated by semicolons). For example:

C:\Windows;C:\Windows\System32;C:\Python27

27 Comments

Hi @Shantanu Sharma, I have download python from offical website for windows zip file and now I need to set path of python till C:\python\python-3.7.4 or C:\python\python-3.7.4\python.exe ?
use this : C:\python\python-3.7.4
Showing Command failed for npm i configure error Error: Command failed: C:\python\python-3.7.4\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! configure error gyp ERR! stack Error: Command failed: C:\python\python-3.7.4\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack File "<string>", line 1 gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack SyntaxError: invalid syntax gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12) gyp ERR! stack at ChildProcess.emit (events.js:198:13) gyp ERR! stack at Process.ChildProcess._handle.onexit gyp ERR! System Windows_NT 10.0.15063
Thank you sooo much @Shantanu your great at last it works
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.