簡體   English   中英

無法為node.js安裝node-steam

[英]Cannot install node-steam for node.js

我嘗試從...安裝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
...

請幫我!

  • 轉到Google並為您的系統找到Python 2.6。 https://www.python.org/download/releases/2.6/
  • 下載並安裝python二進制文件。
  • 假設您使用的是Windows,因為您沒有告訴我們您的操作系統,所以它默認安裝在C:\\python26\\python.exe
  • 現在打開一個空的CMD執行set PYTHON=C:\\python26\\python.exe ,然后運行npm install node-steam ,它應該可以工作。

注意:如果不將PYTHON添加到PATH變量中,則應在每次需要Python的安裝之前鍵入set PYTHON=C:\\python26\\python.exe

您也可以在其官方站點中找到Linux二進制文件。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM