New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when installing @tensorflow/tfjs-node #711
Comments
Can you take a look? |
Hi @JonasJW , This error is because the directory you are using (/Users/jonas/Web Dev/NodeJS/RestAPITest) has a space in the path (within "Web Dev"), as listed in the error logs, "Spaces in action input filenames not supported" by node-gyp binding tool. Could you please rename the directory or move it to another directory and try again? Thanks, |
Thank you so much @kangyizhang. That was it. Also thank you @caisq. |
TensorFlow.js version I get this Error:
Error: node-gyp rebuild failed with: Error: Command failed: node-gyp rebuild
npm WARN rollback Rolling back @types/long@3.0.32 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'c:\Projetos\recogApp\node_modules@types' npm ERR! code ELIFECYCLE npm ERR! A complete log of this run can be found in: |
Hi @lmbellizzi , the binding tool node-gyp does not support python3, can you try python2? |
Hello there I got this error when trying to do the npm install @tensorflow/tfjs-node @tensorflow/tfjs-node@0.1.21 install C:\Users\ASUS\Documents\MachineLearning\Tensorflow\node_modules@tensorflow\tfjs-node
Error: node-gyp rebuild failed with: Error: Command failed: node-gyp rebuild
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\ASUS\Documents\MachineLearning\Tensorflow\package.json' npm ERR! code ELIFECYCLE npm ERR! A complete log of this run can be found in: I have already installed python2.7 and set the node-gyp python to version 2.7 but seems got the error. |
Can you try to run |
Hello, I got this error when trying to do the npm install @tensorflow/tfjs-node on mac @tensorflow/tfjs-node@0.1.17 install /Users/chanhaokun/Documents/Project/ml_Course/MLKits/knn-tf/node_modules/@tensorflow/tfjs-node
Error: node-gyp rebuild failed with: Error: Command failed: node-gyp rebuild TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
npm WARN knn-tf@1.0.0 No description npm ERR! code ELIFECYCLE npm ERR! A complete log of this run can be found in: Any helps will be appreciated! |
Never mind. I updated my node to the latest version and it makes things to work. |
Thanks for the solution. It works now @kangyizhang |
Hi - Any Idea? I did install the windows build tools, initially had python 3.7 installed but have now uninstalled it and set the python path to python2.7 and and there are no spaces in the directory names. C:\TensorFlowModeling>npm install @tensorflow/tfjs-node
Error: node-gyp rebuild failed with: Error: Command failed: node-gyp rebuild
npm WARN enoent ENOENT: no such file or directory, open 'C:\TensorFlowModeling\package.json' npm ERR! code ELIFECYCLE npm ERR! A complete log of this run can be found in: C:\TensorFlowModeling>npm install @tensorflow/tfjs-node
Error: node-gyp rebuild failed with: Error: Command failed: node-gyp rebuild
npm WARN nodejs@1.0.0 No description npm ERR! code ELIFECYCLE npm ERR! A complete log of this run can be found in: |
This is because the win tools are not installed properly. Can you retry |
@nkreeger I tried the
|
@Shadowstep33 thanks updated the README for windows troubleshooting. |
Try to install again with --force option: npm install --force npm update -g npm else Config python: npm config set python /path/to/python2.7 npm config set msvs_version 2013 |
None of the above worked for me. Got it working by uninstalling the community version for now, not very elegant tho. Someone knows how to point node-gyp to the right MSBuild.exe? |
cc @kangyizhang Conor@DESKTOP-FBFEHQO MINGW64 /d/Coding/ML/tf/first
Error: node-gyp rebuild failed with: Error: Command failed: node-gyp rebuild
npm WARN rollback Rolling back @types/node@10.12.21 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'D:\Coding\ML\tf\first\node_modules@types' npm ERR! code ELIFECYCLE npm ERR! A complete log of this run can be found in: |
hi @conorpo For most cases with error Also, you could try to download the |
I reinstalled The Build Tools as a global npm module but I still get the same error, just with a different path. |
@kangyizhang |
Hi, anyone there who can help me with this error log? UPDATE:
|
@kangyizhang When I attempt to install windows build tools globally via npm I get this error Downloading vs_BuildTools.exe Starting installation... Status from the installers: Could not install Visual Studio Build Tools. Skipping configuration: No configuration for Python or Visual Studio Build Tools required.
The log file is not there |
hi @conorpo Can you check if you have microsoft visual studio installed? The error seems to be related with windows environment setup. |
@kangyizhang According to the visual studio installer I have the following installed : Visual Studio Community 2017 (2) and Visual Studio Build Tools 2017 |
Worked after uninstalling python 3 and running |
This has resolved my issue. Simply installing Python 2.7 for Windows and setting the path to it. No more errors. I suppose this will work on my machine w/ Linux installed. |
Thanks! @lmbellizzi |
Trying to install this on a ChromeOS Crostini container with python2.7 installed and on node 11.15 I get this same error. Any ideas? |
I upgraded the version of Visual studio to 2019 and after I restarted windows , then I ran npm install --production windows-build-tools as admin , and the installation of tensorflow worked to me! |
I am getting the following error in ubuntu 20.04 Building TensorFlow Node.js bindings |
I'm getting following error in ubuntu 18.04
@tensorflow/tfjs-node@1.7.4 /home/dummylap-911/Documents/MLKits/knn-tf/node_modules/@tensorflow/tfjs-node
CPU-linux-1.7.4.tar.gz
|
node-pre-gyp WARN Using needle for node-pre-gyp https download npm ERR! A complete log of this run can be found in: |
how to slove this error.please help me. |
@smit12345 you need to install visual studio to compile the bindings in this library. |
any update on this? |
$ npm install @tensorflow/tfjs-node npm ERR! A complete log of this run can be found in: |
plss help me to install npm install @tensorflow/tfjs-node on my system |
same quesion |
saaaame |
I get this same issue when trying to install
Mor info here |
devs alive? |
this is work in my condition https://stackoverflow.com/questions/66402003/sysmlink-error-when-installing-tensorflow-tfjs-node |
I'm having this issue after installing python2.7 and @tensorflow/tfjs-node How do i resolve this ? C:\Users\Orebayo Oluwapelumi\Desktop\brain-tumor-api>npm i @tensorflow/tfjs-node |
To get help from the community, check out our Google group.
TensorFlow.js version
Browser version
Describe the problem or feature request
Error when installing `@tensorflow/tfjs-node``
I get this Error:
Error: node-gyp rebuild failed with: Error: Command failed: node-gyp rebuild Traceback (most recent call last): File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module> sys.exit(gyp.script_main()) File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main return main(sys.argv[1:]) File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main return gyp_main(args) File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in gyp_main generator.GenerateOutput(flat_list, targets, data, params) File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2213, in GenerateOutput part_of_all=qualified_target in needed_targets) File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 793, in Write extra_mac_bundle_resources, part_of_all) File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 967, in WriteActions "Spaces in action input filenames not supported (%s)" % input) AssertionError: Spaces in action input filenames not supported (/Users/jonas/Web Dev/NodeJS/RestAPITest/node_modules/@tensorflow/tfjs-node/scripts/deps-stage.js) gyp ERR! configure error gyp ERR! stack Error:
gyp` failed with exit code: 1gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jonas/Web Dev/NodeJS/RestAPITest/node_modules/@tensorflow/tfjs-node
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN restapitest@1.0.0 No description
npm WARN restapitest@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @tensorflow/tfjs-node@0.1.17 install:
node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @tensorflow/tfjs-node@0.1.17 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! /Users/jonas/.npm/_logs/2018-09-19T16_23_53_635Z-debug.log
Jonass-MBP:RestAPITest jonas$`
Code to reproduce the bug / link to feature request
Running
npm install @tensorflow/tfjs-node
on a Mac with Node version 6.4.1. XCode is installed.The text was updated successfully, but these errors were encountered: