Ran into some hiccups while running NPM install on the Animal Kingdom app as I was using a version 3 of Python…gave an error like:
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /anaconda3/bin/python -c import sys; print “%s.%s.%s” % sys.version_info[:3];
gyp ERR! stack File “”, 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:299:12)
gyp ERR! stack at ChildProcess.emit (events.js:193:13)
gyp ERR! stack at maybeClose (internal/child_process.js:999:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:403:11)
gyp ERR! stack at Socket.emit (events.js:193:13)
gyp ERR! stack at Pipe._handle.close (net.js:614:12)
gyp ERR! System Darwin 18.5.0
Solved it by setting NPM to use version 2 of Python like this:
npm config set python python2.7