Node-gyp: Error: Python executable "python" is v3.4.1, which is not supported by gyp.

Created on 16 Feb 2015  路  6Comments  路  Source: nodejs/node-gyp

> [email protected] install /Users/node_modules/polyfill-service/node_modules/6to5/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

gyp ERR! configure error 
gyp ERR! stack Error: Python executable "python" is v3.4.1, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:108:14)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:97:9
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:646:7)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at maybeClose (child_process.js:756:16)
gyp ERR! stack     at Socket.<anonymous> (child_process.js:969:11)
gyp ERR! stack     at Socket.emit (events.js:95:17)
gyp ERR! stack     at Pipe.close (net.js:465:12)
gyp ERR! System Darwin 14.1.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/node_modules/polyfill-service/node_modules/6to5/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected]
npm ERR! Error: Command failed: fatal: bad object 9fe698067f2667f0dcc9aca6e56fcd14274143cf
npm ERR! 
npm ERR!     at ChildProcess.exithandler (child_process.js:648:15)
npm ERR!     at ChildProcess.emit (events.js:98:17)
npm ERR!     at maybeClose (child_process.js:756:16)
npm ERR!     at Socket.<anonymous> (child_process.js:969:11)
npm ERR!     at Socket.emit (events.js:95:17)
npm ERR!     at Pipe.close (net.js:465:12)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Darwin 14.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "polyfill-service"
npm ERR! cwd /Users/
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code 128
npm ERR! not ok code 0

Most helpful comment

@guogenfang,

npm install --python=python2.7

Or

npm config set python python2.7 && npm install

All 6 comments

Did you read the error message?

gyp ERR! stack Error: Python executable "python" is v3.4.1, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.

When will be possible to use Python version like 3.4?

Or any python release from this decade

Ask Google. They created / maintain gyp.

I also run into this problem,How to solve this problem?thank you!!!

@guogenfang,

npm install --python=python2.7

Or

npm config set python python2.7 && npm install
Was this page helpful?
0 / 5 - 0 ratings