【发布时间】:2019-09-11 06:47:32
【问题描述】:
我正在尝试安装 node-sspi,但出现以下错误:
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 PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:165:21)
gyp ERR! System Windows_NT 10.0.17134
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"
是否有任何解决方案来修复错误或是否有任何替代包。
【问题讨论】:
-
安装 Python 2.7 并将其添加到 Path 变量中。看看这个:stackoverflow.com/questions/21365714/…
-
添加python后出现以下错误:Error: Command failed: C:\Python34\python.EXE -c import sys;打印 "%s.%s.%s" % sys.version_info[:3];吉普错误!堆栈文件“
”,第 1 行 gyp ERR!堆栈导入系统;打印 "%s.%s.%s" % sys.version_info[:3]; -
安装 python 2.7 而不是其他版本
标签: node.js npm installation