繁体   English   中英

需要使用Python和Visual Studio安装Node.js模块(Superfeedr Node.js包装器)

[英]Python and Visual Studio needed to install a Node.js module (Superfeedr Node.js wrapper)

我尝试在Node.js中安装一个模块来与Superfeedr的XMPP API进行交互。 如此处所述( https://github.com/superfeedr/superfeedr-node ),这是我在Node.js中所做的:

npm install superfeedr

但是我在控制台中收到以下消息:

// at the beginning it seems ok but then...

C:\Users\Gabrielle\node_modules\superfeedr\node_modules\node-xmpp\node_modules\node-xmpp-core\node_modules\node-stringprep>node 
"C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" 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: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.0.6001
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-
gyp.js" "rebuild"
gyp ERR! cwd 

//and much following...

我想念什么吗? 为什么提到Python(我根本不使用Python)?

我找到了解决方案的开始:我在C:\\ Python27中下载了Python 2.7,然后通过执行以下操作在Node.js中设置PYTHON变量:

set PYTHON=C:\Python27\Python.exe

(有关详细信息,请参阅在Windows上运行Python以获取Node.js依赖项

然后重新启动:

npm install superfeedr

错误“ gyp ERR!堆栈错误:找不到Python可执行文件“ python”,您可以设置PYTHON env变量”不再发生。 好!

但是现在出现一条错误消息,提示“无法加载组合的Visual C ++“ VCBuild.exe””。 它要求我:安装用于Windows Server 2008和.NET Framework 2.0 3.5的开发工具包Microsoft Windows SDK,或安装Visual Studio2008。然后我收到一条消息,要求我:安装开发工具包.NET Framework 2.0 SDK或安装Visual Studio。 Studio2005。这是另一个问题,我想...

(请参阅错误MSB3411:无法加载Visual C ++组件“ VCBuild.exe”

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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