banderson / generator-redux

CLI tools for Redux: next-gen functional Flux/React with devtools
252 stars 36 forks source link

Installation fails due to missing PYTHON executable #29

Closed vizmi closed 8 years ago

vizmi commented 9 years ago

I am unable to install the generator. Install fails with the following error message:

C:\Users...\AppData\Roaming\npm\node_modules\generator-redux\node_modules\buffertools>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 ) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:116:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:71:11 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15) gyp ERR! System Windows_NT 6.1.7601 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"

As far as I understand PYTHON is not a usual requirement for javascript projects. Also it was not mentioned amongst the project dependencies.

vizmi commented 9 years ago

Some more details from the debug log:

30161 error Windows_NT 6.1.7601 30162 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "generator-redux" 30163 error node v5.0.0 30164 error npm v3.3.6 30165 error code ELIFECYCLE 30166 error buffertools@2.1.3 install: node-gyp rebuild 30166 error Exit status 1 30167 error Failed at the buffertools@2.1.3 install script 'node-gyp rebuild'. 30167 error This is most likely a problem with the buffertools package, 30167 error not with npm itself. 30167 error Tell the author that this fails on your system: 30167 error node-gyp rebuild 30167 error You can get their info via: 30167 error npm owner ls buffertools 30167 error There is likely additional logging output above. 30168 verbose exit [ 1, true ]

banderson commented 8 years ago

Hmmm, I don't have a windows box to test this on right now. Are you still having this problem @vizmi? If so, can you see if this solution works for you?: http://stackoverflow.com/a/33047257/30362

jmfirth commented 8 years ago

Works fine for me.

@vizmi many node dependencies are composed of native modules which are built for the system using node-gyp. Python 2.7 is one of the requirements of this tool. Please see the README documentation at https://github.com/nodejs/node-gyp which contains information for how to prepare your environment to support native module building.

vizmi commented 8 years ago

Thanks for the info, I will look into it. I am closing the ticket as the issue is not with the generator but the underlying framework.