【问题标题】:Python and Visual Studio needed to install a Node.js module (Superfeedr Node.js wrapper)Python 和 Visual Studio 需要安装 Node.js 模块(Superfeedr Node.js 包装器)
【发布时间】:2014-04-03 15:32:38
【问题描述】:

我尝试在 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)?

【问题讨论】:

    标签: javascript node.js rss feed superfeedr


    【解决方案1】:

    我找到了解决方案的开头:我下载了 Python 2.7 在 C:\Python27 然后在 Node.js 中设置 PYTHON 变量:

    set PYTHON=C:\Python27\Python.exe
    

    (详情见Running Python on Windows for Node.js dependencies

    然后重新启动:

    npm install superfeedr
    

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

    但现在有一条错误消息显示“无法加载复合 Visual C++“VCBuild.exe””。它问我:安装开发工具包 Microsoft Windows SDK for Windows Server 2008 和 .NET Framework 2.0 3.5,或安装 Visual Studio 2008。然后我收到消息问我:安装开发工具包 .NET Framework 2.0 SDK 或安装 Visual Studio 2005。我猜这是另一个问题......

    (见error MSB3411: Could not l oad the Visual C++ component "VCBuild.exe"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-14
      • 2012-07-22
      • 2015-12-08
      • 2011-11-12
      • 2013-03-05
      • 1970-01-01
      相关资源
      最近更新 更多