Tfjs: gyp ERR! configure error gyp ERR! stack Error: Command failed

Created on 28 Aug 2019  路  3Comments  路  Source: tensorflow/tfjs

To get help from the community, we encourage using Stack Overflow and the tensorflow.js tag.

TensorFlow.js version

1.2.8

Browser version

Firefox/chrome

Describe the problem or feature request

Cant install tfjs-node with this error

PS C:\Connect\Teste01> npm install @tensorflow/tfjs-node

@tensorflow/[email protected] install C:\Connect\Teste01\node_modules\@tensorflow\tfjs-node
node scripts/install.js

CPU-windows-1.2.8.zip

  • Downloading libtensorflow
    [==============================] 11129583/bps 100% 0.0s
    [==============================] 1338573/bps 100% 0.0s
  • Building TensorFlow Node.js bindings
    node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build
    node-pre-gyp WARN Using needle for node-pre-gyp https download
    node-pre-gyp WARN Tried to download(404): https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v4/1.2.8/tfjs_binding-v1.2.8-node-v64-win32-x64.tar.gz
    node-pre-gyp WARN Pre-built binaries not found for @tensorflow/[email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
    gyp ERR! configure error
    gyp ERR! stack Error: Command failed: C:\Users\artur\Anaconda3\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
    gyp ERR! stack File "", 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:294:12)
    gyp ERR! stack at ChildProcess.emit (events.js:198:13)
    gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
    gyp ERR! System Windows_NT 10.0.18362
    gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\Connect\Teste01\node_modules\@tensorflow\tfjs-node\lib\napi-v4\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\Connect\Teste01\node_modules\@tensorflow\tfjs-node\lib\napi-v4" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=4" "--node_napi_label=napi-v4"
    gyp ERR! cwd C:\Connect\Teste01\node_modules\@tensorflow\tfjs-node
    gyp ERR! node -v v10.16.3
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok
    node-pre-gyp ERR! build error
    node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Connect\Teste01\node_modules\@tensorflow\tfjs-node\lib\napi-v4\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\Connect\Teste01\node_modules\@tensorflow\tfjs-node\lib\napi-v4 --napi_version=4 --node_abi_napi=napi --napi_build_version=4 --node_napi_label=napi-v4' (1)
    node-pre-gyp ERR! stack at ChildProcess. (C:\Connect\Teste01\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
    node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13)
    node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
    node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
    node-pre-gyp ERR! System Windows_NT 10.0.18362
    node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Connect\Teste01\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-node-pre-gyp ERR! cwd C:\Connect\Teste01\node_modules\@tensorflow\tfjs-node
    node-pre-gyp ERR! node -v v10.16.3
    node-pre-gyp ERR! node-pre-gyp -v v0.13.0
    node-pre-gyp ERR! not ok

npm WARN saveError ENOENT: no such file or directory, open 'C:\Connect\Teste01\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Connect\Teste01\package.json'
npm WARN Teste01 No description
npm WARN Teste01 No repository field.
npm WARN Teste01 No README data
npm WARN Teste01 No license field.

  • @tensorflow/[email protected]
    updated 1 package and audited 533 packages in 6.855s
    found 0 vulnerabilities

Code to reproduce the bug / link to feature request

If you would like to get help from the community, we encourage using Stack Overflow and the tensorflow.js tag.

GitHub issues for this repository are tracked in the tfjs union repository.

Please file your issue there, following the guidance in that issue template.

Most helpful comment

Use:

npm install @tensorflow/[email protected] and

npm install @tensorflow/[email protected]

This solved my problem.

All 3 comments

Use:

npm install @tensorflow/[email protected] and

npm install @tensorflow/[email protected]

This solved my problem.

duplicate of #1912

Thanks

Was this page helpful?
0 / 5 - 0 ratings