0

I'm having difficulties installing web3 on my mac. I've tried a number of fixes but I get the same error every time.

I tried installing sha3 separately and made sure that I had Xtools installed.

gyp ERR! configure error 
gyp ERR! stack Error: Command failed: /Users/craiglou/anaconda3/bin/python -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                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack 
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:389:11)
gyp ERR! stack     at Socket.emit (events.js:189:13)
gyp ERR! stack     at Pipe._handle.close (net.js:597:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/craiglou/Desktop/inbox/node_modules/keccakjs/node_modules/sha3
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN webpack-cli@2.1.5 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN inbox@1.0.0 No description
npm WARN inbox@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sha3@1.2.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sha3@1.2.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!     /Users/craiglou/.npm/_logs/2019-08-19T23_31_04_618Z-debug.log
TylerH
  • 20,799
  • 66
  • 75
  • 101
Craig Lou
  • 5
  • 1
  • I suspect this is due to running python3 instead of python2. Not sure why that's happening, but the syntax given there works fine in Python 2 but not Python 3 (due to the lack of parentheses around the call to `print`). – user94559 Aug 20 '19 at 04:56
  • I have python 2, but still getting the errors – Amit Sharma Nov 22 '19 at 13:24

0 Answers0