gyp动词“ which”失败错误:未找到:python2

时间:2019-05-10 10:30:20

标签: node.js ionic-framework node-gyp

我正在尝试运行离子项目。在“ npm install”命令上,我得到python2 not found错误。我猜我的npm配置文件有问题。 谁能帮我找到解决方案。

gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\MobileWorkspace\old2\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\MobileWorkspace\old2\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\MobileWorkspace\old2\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\MobileWorkspace\old2\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\MobileWorkspace\old2\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\MobileWorkspace\old2\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\MobileWorkspace\old2\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\MobileWorkspace\old2\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\MobileWorkspace\old2\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\MobileWorkspace\old2\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\MobileWorkspace\old2\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\MobileWorkspace\old2\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python2\n    at getNotFoundError (C:\\MobileWorkspace\\old2\\node_modules\\which\\which.js:13:12)\n    at F (C:\\MobileWorkspace\\old2\\node_modules\\which\\which.js:68:19)\n    at E (C:\\MobileWorkspace\\old2\\node_modules\\which\\which.js:80:29)\n    at C:\\MobileWorkspace\\old2\\node_modules\\which\\which.js:89:16\n    at C:\\MobileWorkspace\\old2\\node_modules\\isexe\\index.js:42:5\n    at C:\\MobileWorkspace\\old2\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:153:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (C:\MobileWorkspace\old2\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\MobileWorkspace\old2\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\MobileWorkspace\old2\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\MobileWorkspace\old2\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\MobileWorkspace\old2\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\MobileWorkspace\old2\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed  python { Error: not found: python
gyp verb `which` failed     at getNotFoundError (C:\MobileWorkspace\old2\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\MobileWorkspace\old2\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\MobileWorkspace\old2\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\MobileWorkspace\old2\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\MobileWorkspace\old2\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\MobileWorkspace\old2\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python\n    at getNotFoundError (C:\\MobileWorkspace\\old2\\node_modules\\which\\which.js:13:12)\n    at F (C:\\MobileWorkspace\\old2\\node_modules\\which\\which.js:68:19)\n    at E (C:\\MobileWorkspace\\old2\\node_modules\\which\\which.js:80:29)\n    at C:\\MobileWorkspace\\old2\\node_modules\\which\\which.js:89:16\n    at C:\\MobileWorkspace\\old2\\node_modules\\isexe\\index.js:42:5\n    at C:\\MobileWorkspace\\old2\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:153:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.

0 个答案:

没有答案