无法安装tensorflow.js @ tensorflow / tfjs-node

时间:2019-01-04 06:38:14

标签: node.js tensorflow node-modules

我无法在本地计算机上的项目中安装 tensorflow.js 模块的库。它描述的问题如下:

Building TensorFlow Node.js bindings
C:\mlwithjs\tensorflowjs\node_modules\@tensorflow\tfjs-node\scripts\install.js:176
      throw new Error('node-gyp rebuild failed with: ' + err);
      ^

Error: node-gyp rebuild failed with: Error: Command failed: node-gyp rebuild
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.17763
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:\mlwithjs\tensorflowjs\node_modules\@tensorflow\tfjs-node
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

    at cp.exec (C:\mlwithjs\tensorflowjs\node_modules\@tensorflow\tfjs-node\scripts\install.js:176:13)
    at ChildProcess.exithandler (child_process.js:301:5)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
npm WARN rollback Rolling back @types/seedrandom@2.4.27 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\mlwithjs\tensorflowjs\node_modules\@types'
npm WARN rollback Rolling back @types/webgl2@0.0.4 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\mlwithjs\tensorflowjs\node_modules\@types'npm WARN tensorflowjs@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @tensorflow/tfjs-node@0.2.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @tensorflow/tfjs-node@0.2.1 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\Saqib\AppData\Roaming\npm-cache\_logs\2019-01-03T15_18_04_741Z-debug.log

我尝试了命令npm install -g build tools。尽管它正在安装其他模块。

我正在使用npm install @tensorflow/tfjs-node命令来安装它,但没有帮助。我用谷歌搜索,但是什么都没找到。

0 个答案:

没有答案