So I am trying to get the Node.js to work. Of course, it's not as easy as advertised :)
I happen to have two python versions on my computer, but Node.js seems to only work with the older one, 2.7. Upon error, it also encourages me to set the path into PYTHON
environment variable with this error:
Error: Can't find Python executable "python2.7", you can set the PYTHON env variable.
Ok then, I configured the variable as desired:
C:UsersJakub>set PYTHON=C:MYSELFProgramsPython2.7python.exe
C:UsersJakub>echo %PYTHON%
C:MYSELFProgramsPython2.7python.exe
You can see that I used echo
to check whether the variable was really set. Unfortunatelly, that npm
thing can't read it and the error appears again. Here's the full log right after I set the %PYTHON%
variable:
C:UsersJakub>npm install minecraft-protocol
> [email protected] install C:UsersJakub
ode_modulesminecraft-protocol
ode_modulesursa
> node-gyp rebuild
|
C:UsersJakub
ode_modulesminecraft-protocol
ode_modulesursa>if not defined npm_config_node_gyp (node "C:Program Files (x86)
odejs
ode_modules
pmin
ode-gyp-bin\....
o
de_modules
ode-gypin
ode-gyp.js" rebuild ) else (rebuild)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python2.7", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (C:Program Files (x86)
odejs
ode_modules
pm
ode_modules
ode-gyplibconfigure.js:103:14)
gyp ERR! stack at C:Program Files (x86)
odejs
ode_modules
pm
ode_modules
ode-gyplibconfigure.js:64:11
gyp ERR! stack at FSReqWrap.oncomplete (evalmachine.<anonymous>:95:15)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…