win10下安装web3失败问题

1.在安装web3上面出错如下:



H:\nodejsData>npm install web3


> web3@1.0.0-beta.18 postinstall H:\nodejsData\node_modules\web3
> lerna bootstrap


lerna info version 2.1.2
lerna info Bootstrapping 19 packages
lerna info lifecycle preinstall
lerna info Installing external dependencies
lerna ERR! execute Error: Command failed: npm install
lerna ERR! execute npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
lerna ERR! execute gyp ERR! configure error
lerna ERR! execute gyp ERR! stack Error: Can't find Python executable "F:\SoftWare\python\python.EXE", you can set the PYTHON env variable.
lerna ERR! execute gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
lerna ERR! execute gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
lerna ERR! execute gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
lerna ERR! execute gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
lerna ERR! execute gyp ERR! System Windows_NT 10.0.14393
lerna ERR! execute 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"
lerna ERR! execute gyp ERR! cwd H:\nodejsData\node_modules\web3\packages\web3-eth-accounts\node_modules\scrypt
lerna ERR! execute gyp ERR! node -v v8.4.0
lerna ERR! execute gyp ERR! node-gyp -v v3.6.2
lerna ERR! execute gyp ERR! not ok
lerna ERR! execute npm WARN web3-eth-accounts No repository field.
lerna ERR! execute npm WARN web3-eth-accounts No license field.
lerna ERR! execute
lerna ERR! execute npm ERR! code ELIFECYCLE
lerna ERR! execute npm ERR! errno 1
lerna ERR! execute npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
lerna ERR! execute npm ERR! Exit status 1
lerna ERR! execute npm ERR!
lerna ERR! execute npm ERR! Failed at the scrypt@6.0.3 install script.
lerna ERR! execute npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
lerna ERR! execute
lerna ERR! execute npm ERR! A complete log of this run can be found in:
lerna ERR! execute npm ERR!     C:\Program Files\nodejs\node_cache\_logs\2017-09-02T23_05_22_987Z-debug.log
lerna ERR! execute
lerna ERR! execute > scrypt@6.0.3 preinstall H:\nodejsData\node_modules\web3\packages\web3-eth-accounts\node_modules\scrypt
lerna ERR! execute > node node-scrypt-preinstall.js
lerna ERR! execute
lerna ERR! execute
lerna ERR! execute > scrypt@6.0.3 install H:\nodejsData\node_modules\web3\packages\web3-eth-accounts\node_modules\scrypt
lerna ERR! execute > node-gyp rebuild
lerna ERR! execute
lerna ERR! execute
lerna ERR! execute H:\nodejsData\node_modules\web3\packages\web3-eth-accounts\node_modules\scrypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
lerna ERR! execute
lerna ERR! execute     at Promise.all.then.arr (H:\nodejsData\node_modules\execa\index.js:236:11)
lerna ERR! execute     at <anonymous>
lerna ERR! execute     at process._tickCallback (internal/process/next_tick.js:188:7)
lerna ERR! execute  callback with error
lerna ERR! execute  { Error: Command failed: npm install
lerna ERR! execute npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
lerna ERR! execute gyp ERR! configure error
lerna ERR! execute gyp ERR! stack Error: Can't find Python executable "F:\SoftWare\python\python.EXE", you can set the PYTHON env variable.
lerna ERR! execute gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
lerna ERR! execute gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
lerna ERR! execute gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
lerna ERR! execute gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
lerna ERR! execute gyp ERR! System Windows_NT 10.0.14393
lerna ERR! execute 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"
lerna ERR! execute gyp ERR! cwd H:\nodejsData\node_modules\web3\packages\web3-eth-accounts\node_modules\scrypt
lerna ERR! execute gyp ERR! node -v v8.4.0
lerna ERR! execute gyp ERR! node-gyp -v v3.6.2
lerna ERR! execute gyp ERR! not ok
lerna ERR! execute npm WARN web3-eth-accounts No repository field.
lerna ERR! execute npm WARN web3-eth-accounts No license field.
lerna ERR! execute
lerna ERR! execute npm ERR! code ELIFECYCLE
lerna ERR! execute npm ERR! errno 1
lerna ERR! execute npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
lerna ERR! execute npm ERR! Exit status 1
lerna ERR! execute npm ERR!
lerna ERR! execute npm ERR! Failed at the scrypt@6.0.3 install script.
lerna ERR! execute npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
lerna ERR! execute
lerna ERR! execute npm ERR! A complete log of this run can be found in:
lerna ERR! execute npm ERR!     C:\Program Files\nodejs\node_cache\_logs\2017-09-02T23_05_22_987Z-debug.log
lerna ERR! execute
lerna ERR! execute > scrypt@6.0.3 preinstall H:\nodejsData\node_modules\web3\packages\web3-eth-accounts\node_modules\scrypt
lerna ERR! execute > node node-scrypt-preinstall.js
lerna ERR! execute
lerna ERR! execute
lerna ERR! execute > scrypt@6.0.3 install H:\nodejsData\node_modules\web3\packages\web3-eth-accounts\node_modules\scrypt
lerna ERR! execute > node-gyp rebuild
lerna ERR! execute
lerna ERR! execute
lerna ERR! execute H:\nodejsData\node_modules\web3\packages\web3-eth-accounts\node_modules\scrypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
lerna ERR! execute
lerna ERR! execute     at Promise.all.then.arr (H:\nodejsData\node_modules\execa\index.js:236:11)
lerna ERR! execute     at <anonymous>
lerna ERR! execute     at process._tickCallback (internal/process/next_tick.js:188:7)
lerna ERR! execute   stack: 'Error: Command failed: npm install\nnpm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue\ngyp ERR! configure error \ngyp ERR! stack Error: Can\'t find Python executable "F:\\SoftWare\\python\\python.EXE", you can set the PYTHON env variable.\ngyp ERR! stack     at PythonFinder.failNoPython (C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\lib\\configure.js:483:19)\ngyp ERR! stack     at PythonFinder.<anonymous> (C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\lib\\configure.js:508:16)\ngyp ERR! stack     at C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\graceful-fs\\polyfills.js:284:29\ngyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)\ngyp ERR! System Windows_NT 10.0.14393\ngyp ERR! command "C:\\\\Program Files\\\\nodejs\\\\node.exe" "C:\\\\Program Files\\\\nodejs\\\\node_modules\\\\npm\\\\node_modules\\\\node-gyp\\\\bin\\\\node-gyp.js" "rebuild"\ngyp ERR! cwd H:\\nodejsData\\node_modules\\web3\\packages\\web3-eth-accounts\\node_modules\\scrypt\ngyp ERR! node -v v8.4.0\ngyp ERR! node-gyp -v v3.6.2\ngyp ERR! not ok \nnpm WARN web3-eth-accounts No repository field.\nnpm WARN web3-eth-accounts No license field.\n\nnpm ERR! code ELIFECYCLE\nnpm ERR! errno 1\nnpm ERR! scrypt@6.0.3 install: `node-gyp rebuild`\nnpm ERR! Exit status 1\nnpm ERR! \nnpm ERR! Failed at the scrypt@6.0.3 install script.\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR!     C:\\Program Files\\nodejs\\node_cache\\_logs\\2017-09-02T23_05_22_987Z-debug.log\n\n> scrypt@6.0.3 preinstall H:\\nodejsData\\node_modules\\web3\\packages\\web3-eth-accounts\\node_modules\\scrypt\n> node node-scrypt-preinstall.js\n\n\n> scrypt@6.0.3 install H:\\nodejsData\\node_modules\\web3\\packages\\web3-eth-accounts\\node_modules\\scrypt\n> node-gyp rebuild\n\n\r\nH:\\nodejsData\\node_modules\\web3\\packages\\web3-eth-accounts\\node_modules\\scrypt>if not defined npm_config_node_gyp (node "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\node-gyp-bin\\\\..\\..\\node_modules\\node-gyp\\bin\\node-gyp.js" rebuild )  else (node "" rebuild ) \r\n\n    at Promise.all.then.arr (H:\\nodejsData\\node_modules\\execa\\index.js:236:11)\n    at <anonymous>\n    at process._tickCallback (internal/process/next_tick.js:188:7)',
lerna ERR! execute   code: 1,
lerna ERR! execute   killed: false,
lerna ERR! execute   stdout: '\n> scrypt@6.0.3 preinstall H:\\nodejsData\\node_modules\\web3\\packages\\web3-eth-accounts\\node_modules\\scrypt\n> node node-scrypt-preinstall.js\n\n\n> scrypt@6.0.3 install H:\\nodejsData\\node_modules\\web3\\packages\\web3-eth-accounts\\node_modules\\scrypt\n> node-gyp rebuild\n\n\r\nH:\\nodejsData\\node_modules\\web3\\packages\\web3-eth-accounts\\node_modules\\scrypt>if not defined npm_config_node_gyp (node "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\node-gyp-bin\\\\..\\..\\node_modules\\node-gyp\\bin\\node-gyp.js" rebuild )  else (node "" rebuild ) \r\n',
lerna ERR! execute   stderr: 'npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue\ngyp ERR! configure error \ngyp ERR! stack Error: Can\'t find Python executable "F:\\SoftWare\\python\\python.EXE", you can set the PYTHON env variable.\ngyp ERR! stack     at PythonFinder.failNoPython (C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\lib\\configure.js:483:19)\ngyp ERR! stack     at PythonFinder.<anonymous> (C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\lib\\configure.js:508:16)\ngyp ERR! stack     at C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\graceful-fs\\polyfills.js:284:29\ngyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)\ngyp ERR! System Windows_NT 10.0.14393\ngyp ERR! command "C:\\\\Program Files\\\\nodejs\\\\node.exe" "C:\\\\Program Files\\\\nodejs\\\\node_modules\\\\npm\\\\node_modules\\\\node-gyp\\\\bin\\\\node-gyp.js" "rebuild"\ngyp ERR! cwd H:\\nodejsData\\node_modules\\web3\\packages\\web3-eth-accounts\\node_modules\\scrypt\ngyp ERR! node -v v8.4.0\ngyp ERR! node-gyp -v v3.6.2\ngyp ERR! not ok \nnpm WARN web3-eth-accounts No repository field.\nnpm WARN web3-eth-accounts No license field.\n\nnpm ERR! code ELIFECYCLE\nnpm ERR! errno 1\nnpm ERR! scrypt@6.0.3 install: `node-gyp rebuild`\nnpm ERR! Exit status 1\nnpm ERR! \nnpm ERR! Failed at the scrypt@6.0.3 install script.\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR!     C:\\Program Files\\nodejs\\node_cache\\_logs\\2017-09-02T23_05_22_987Z-debug.log\n',
lerna ERR! execute   failed: true,
lerna ERR! execute   signal: null,
lerna ERR! execute   cmd: 'npm install',
lerna ERR! execute   timedOut: false }
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
npm WARN Error: EPERM: operation not permitted, scandir 'H:\nodejsData\node_modules\read-pkg-up\node_modules'
npm WARN  { Error: EPERM: operation not permitted, scandir 'H:\nodejsData\node_modules\read-pkg-up\node_modules'
npm WARN   stack: 'Error: EPERM: operation not permitted, scandir \'H:\\nodejsData\\node_modules\\read-pkg-up\\node_modules\'',
npm WARN   errno: -4048,
npm WARN   code: 'EPERM',
npm WARN   syscall: 'scandir',
npm WARN   path: 'H:\\nodejsData\\node_modules\\read-pkg-up\\node_modules' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! web3@1.0.0-beta.18 postinstall: `lerna bootstrap`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the web3@1.0.0-beta.18 postinstall 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:\Program Files\nodejs\node_cache\_logs\2017-09-02T23_05_37_212Z-debug.log


纠结了一个星期才解决了,① 首先可以先通过 npm cache verify 清理下缓存,在进行安装

② 如果还是安装失败可以尝试 ---   npm install web3@^0.20.0  或者 npm install v6  ,进行安装npm install web3

③ 个人是通过 npm install web3@^0.20.0 安装成功的    

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值