简体   繁体   中英

Cannot install node-steam for node.js

I try to install node-steam from ... and got a big error
How can I fix that, is this my fault?
node-steam: https://github.com/seishun/node-steam

...
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack     at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:101:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:64:11
gyp ERR! stack     at Object.oncomplete (fs.js:107:15)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "configure" "build"
gyp ERR! cwd C:\Users\FongZooZ\Desktop\project\test\node_modules\steam\node_modu
les\ursa
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
...

Please help me!

  • Go to Google and find Python 2.6 for your system. ( https://www.python.org/download/releases/2.6/ )
  • Download and install the python binaries.
  • Assuming you're using Windows, since you didn't tell us your OS, It's installed by default in C:\\python26\\python.exe .
  • Now open an empty CMD execute set PYTHON=C:\\python26\\python.exe , then run npm install node-steam and it should work.

Note: If you don't add the PYTHON to your PATH variable, you should type set PYTHON=C:\\python26\\python.exe before each installation that requires Python.

You can find a Linux binaries in their official site too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM