npm安装创建障碍获取python env错误

时间:2018-05-07 20:02:47

标签: python npm npm-install web3

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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd G:\project\kanwat infotech\new project\node_modules\scrypt
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN new project No description
npm WARN new project No repository field.
npm WARN new project No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt@6.0.3 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\Sandeep\AppData\Roaming\npm-cache\_logs\2018-05-07T19_54_26_289Z-debug.log

我在安装web3包时遇到了这个错误。我已经浪费了2天时间来解决这个问题。请帮我解决这个问题。在解决这个问题时需要你们所有人的帮助。提前致谢

1 个答案:

答案 0 :(得分:0)

从错误消息的外观中,您没有安装python OR PYTHON env设置为错误的位置。

Error: Can't find Python executable "C:\Programs\Python2.7\python2.7.exe", you can set the PYTHON env variable

检查以下命令是否有效,如果没有则安装pythong。

python --version