无法使用npm安装播放器模块

我正在尝试安装以下节点模块:

https://www.npmjs.com/package/player

试图用命令安装它

npm install player 

我得到了以下错误输出的墙:

 C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots>npm install player > lame@1.2.3 install C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\lame > node-gyp rebuild C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\lame>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: Python executable "python" is v3.4.4, 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 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:121:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:110:9 gyp ERR! stack at ChildProcess.exithandler (child_process.js:204:7) gyp ERR! stack at emitTwo (events.js:100:13) gyp ERR! stack at ChildProcess.emit (events.js:185:7) gyp ERR! stack at maybeClose (internal/child_process.js:821:16) gyp ERR! stack at Socket.<anonymous> (internal/child_process.js:319:11) gyp ERR! stack at emitOne (events.js:90:13) gyp ERR! stack at Socket.emit (events.js:182:7) gyp ERR! stack at Pipe._onclose (net.js:469:12) gyp ERR! System Windows_NT 10.0.10586 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" gyp ERR! cwd C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\lame gyp ERR! node -v v5.5.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN install:lame@1.2.3 lame@1.2.3 install: `node-gyp rebuild` npm WARN install:lame@1.2.3 Exit status 1 > speaker@0.2.6 install C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\speaker > node-gyp rebuild C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\speaker>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: Python executable "python" is v3.4.4, 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 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:121:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:110:9 gyp ERR! stack at ChildProcess.exithandler (child_process.js:204:7) gyp ERR! stack at emitTwo (events.js:100:13) gyp ERR! stack at ChildProcess.emit (events.js:185:7) gyp ERR! stack at maybeClose (internal/child_process.js:821:16) gyp ERR! stack at Socket.<anonymous> (internal/child_process.js:319:11) gyp ERR! stack at emitOne (events.js:90:13) gyp ERR! stack at Socket.emit (events.js:182:7) gyp ERR! stack at Pipe._onclose (net.js:469:12) gyp ERR! System Windows_NT 10.0.10586 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" gyp ERR! cwd C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\speaker gyp ERR! node -v v5.5.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN install:speaker@0.2.6 speaker@0.2.6 install: `node-gyp rebuild` npm WARN install:speaker@0.2.6 Exit status 1 > bufferutil@1.2.1 install C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\ws\node_modules\bufferutil > node-gyp rebuild C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\ws\node_modules\bufferutil>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: Python executable "python" is v3.4.4, 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 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:121:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:110:9 gyp ERR! stack at ChildProcess.exithandler (child_process.js:204:7) gyp ERR! stack at emitTwo (events.js:100:13) gyp ERR! stack at ChildProcess.emit (events.js:185:7) gyp ERR! stack at maybeClose (internal/child_process.js:821:16) gyp ERR! stack at Socket.<anonymous> (internal/child_process.js:319:11) gyp ERR! stack at emitOne (events.js:90:13) gyp ERR! stack at Socket.emit (events.js:182:7) gyp ERR! stack at Pipe._onclose (net.js:469:12) gyp ERR! System Windows_NT 10.0.10586 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" gyp ERR! cwd C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\ws\node_modules\bufferutil gyp ERR! node -v v5.5.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN install:bufferutil@1.2.1 bufferutil@1.2.1 install: `node-gyp rebuild` npm WARN install:bufferutil@1.2.1 Exit status 1 > utf-8-validate@1.2.1 install C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\ws\node_modules\utf-8-validate > node-gyp rebuild C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\ws\node_modules\utf-8-validate>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: Python executable "python" is v3.4.4, 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 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:121:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:110:9 gyp ERR! stack at ChildProcess.exithandler (child_process.js:204:7) gyp ERR! stack at emitTwo (events.js:100:13) gyp ERR! stack at ChildProcess.emit (events.js:185:7) gyp ERR! stack at maybeClose (internal/child_process.js:821:16) gyp ERR! stack at Socket.<anonymous> (internal/child_process.js:319:11) gyp ERR! stack at emitOne (events.js:90:13) gyp ERR! stack at Socket.emit (events.js:182:7) gyp ERR! stack at Pipe._onclose (net.js:469:12) gyp ERR! System Windows_NT 10.0.10586 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" gyp ERR! cwd C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\ws\node_modules\utf-8-validate gyp ERR! node -v v5.5.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install: `node-gyp rebuild` npm WARN install:utf-8-validate@1.2.1 Exit status 1 C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots └── (empty) npm WARN ENOENT ENOENT: no such file or directory, open 'C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\package.json' npm WARN ENOENT ENOENT: no such file or directory, open 'C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\utf-8-validate\package.json' npm WARN ENOENT ENOENT: no such file or directory, open 'C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots\node_modules\bufferutil\package.json' npm WARN EPACKAGEJSON PinkstarTVBots No description npm WARN EPACKAGEJSON PinkstarTVBots No repository field. npm WARN EPACKAGEJSON PinkstarTVBots No README data npm WARN EPACKAGEJSON PinkstarTVBots No license field. npm ERR! code 1 C:\Users\AbfalterJakob\MEGA\Projekte\PinkstarTVBots> 

我无法从这个错误找出是什么原因造成的问题。 我试过已经安装了node-gyp,它工作,但没有任何改变。

       

网上收集的解决方案 "无法使用npm安装播放器模块"

看来你的系统中使用/安装的版本不被支持。

 gyp ERR! stack Error: Python executable "python" is v3.4.4, 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. 

尝试安装低于3.0.0和大于2.5.0的Python版本。 它应该解决这个问题。

在node-gyp的GitHub页面中,他们推荐Python v2.7