javascript - `npm install`后出现关于python语法错误的错误?

我正在尝试为 Exokit 安装必要的依赖项,但我收到与 Python 语法错误相关的错误。

这是我想在浏览器中尝试涉及 VR 的新事物。我已经从他们的 github 上重新克隆了存储库并直接从他们的网站下载。我按照给 T 的说明进行了操作(只有 4 个,哈哈)。

我还没有触及代码,这是我遇到的错误。

Austin@DESKTOP-UD2R1O4 MINGW64 ~/exokit (master)
$ npm install

> raw-buffer@0.0.19 install C:\Users\Austin\exokit\node_modules\raw-buffer
> node-gyp rebuild


C:\Users\Austin\exokit\node_modules\raw-buffer>if not defined 
npm_config_node_gyp (node "C:\Program 
Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp- 
bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node 
"C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Austin\Anaconda3\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:276:12)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:915:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
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"
gyp ERR! cwd C:\Users\Austin\exokit\node_modules\raw-buffer
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! raw-buffer@0.0.19 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the raw-buffer@0.0.19 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Austin\AppData\Roaming\npm-cache\_logs\2019-01-06T06_55_37_752Z-debug.log

最佳答案

在 cmd 管理员中尝试此操作(如果 cmd 卡住,则在 Windows Powershell 管理员中尝试)

npm install --global windows-build-tools

关于javascript - `npm install`后出现关于python语法错误的错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57217251/

相关文章:

javascript - 无法让用 chrome 录制的音频 blob 在 safari 中工作

reactjs - react Hook : Idiomatic way to ensure tha

css - 自托管字体在 Gatsby 和 Safari 中不起作用

angular - Froala 编辑器 formControl 在第二次加载后不更新

php - LinkedIn Share API 'ugcPosts' 响应 504 PHP 网关超

python - AWS Lambda——无法为 SpaCy 导入 srsly.ujson.ujso

python - 如何在 Django 的运行服务器中进行事后调试?

node.js - 当调用 Axios GET 并且 express 服务器发送 .json() 时

redux - 将 Prop 传递给 redux 初始状态

macos - 错误 : command 'gcc' failed with exit status