Skip to content
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

Can't Install after reinstall windows 10 #8049

Closed
el9in opened this issue Nov 2, 2023 · 7 comments
Closed

Can't Install after reinstall windows 10 #8049

el9in opened this issue Nov 2, 2023 · 7 comments

Comments

@el9in
Copy link

el9in commented Nov 2, 2023

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Win 10 Pro
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: -
  • TensorFlow.js installed from (npm or script link): npm
  • TensorFlow.js version: 4.12.0
  • CUDA/cuDNN version: 11.8 / 12.2 | x86_64-8.9.5.30_cuda12

Can't Install tensorlofw 4.12.0

npm install @tensorflow/tfjs-node@4.12.0

npm ERR! code 1
npm ERR! path D:\MyData\PROGER\JS\Тестирование\Tensorflow\node_modules\@tensorflow\tfjs-node
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/install.js
npm ERR! CPU-windows-4.12.0.zip
npm ERR! https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-2.9.1.zip
npm ERR! * Downloading libtensorflow
npm ERR!
npm ERR! * Building TensorFlow Node.js bindings
npm ERR! symlink ./lib/napi-v9 failed:  Error: Command failed: node scripts/deps-stage.js symlink ./lib/napi-v9
npm ERR!   * Symlink of lib\napi-v9\tensorflow.dll failed, creating a copy on disk.
npm ERR! node:internal/process/promises:289
npm ERR!             triggerUncaughtException(err, true /* fromPromise */);
npm ERR!             ^
npm ERR!
npm ERR! [Error: ENOENT: no such file or directory, copyfile 'D:\MyData\PROGER\JS\Тестирование\Tensorflow\node_modules\@tensorflow\tfjs-node\deps\lib\tensorflow.dll' -> 'D:\MyData\PROGER\JS\Тестирование\Tensorflow\node_modules\@tensorflow\tfjs-node\lib\napi-v9\tensorflow.dll'] {
npm ERR!   errno: -4058,
npm ERR!   code: 'ENOENT',
npm ERR!   syscall: 'copyfile',
npm ERR!   path: 'D:\\MyData\\PROGER\\JS\\Тестирование\\Tensorflow\\node_modules\\@tensorflow\\tfjs-node\\deps\\lib\\tensorflow.dll',
npm ERR!   dest: 'D:\\MyData\\PROGER\\JS\\Тестирование\\Tensorflow\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v9\\tensorflow.dll'
npm ERR! }
npm ERR!
npm ERR! Node.js v20.6.1
npm ERR!
npm ERR!     at ChildProcess.exithandler (node:child_process:422:12)
npm ERR!     at ChildProcess.emit (node:events:514:28)
npm ERR!     at maybeClose (node:internal/child_process:1105:16)
npm ERR!     at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
npm ERR!   code: 1,
npm ERR!   killed: false,
npm ERR!   signal: null,
npm ERR!   cmd: 'node scripts/deps-stage.js symlink ./lib/napi-v9'
npm ERR! }

npm ERR! A complete log of this run can be found in: C:\Users\ivand\AppData\Local\npm-cache\_logs\2023-11-02T17_44_39_345Z-debug-0.log
@el9in el9in changed the title Can't Install afret reinstall windows 10 Can't Install after reinstall windows 10 Nov 2, 2023
@el9in
Copy link
Author

el9in commented Nov 2, 2023

node-gyp rebuild

node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@10.0.0
gyp info using node@20.6.1 | win32 | x64
gyp info find Python using Python version 3.11.5 found at "C:\Python311\python.exe"

gyp info find VS using VS2022 (17.7.34221.43) found at:
gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python311\python.exe
gyp info spawn args [
gyp info spawn args 'C:\\Users\\ivand\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'D:\\MyData\\PROGER\\JS\\Тестирование\\Tensorflow\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\ivand\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\ivand\\AppData\\Local\\node-gyp\\Cache\\20.6.1\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\ivand\\AppData\\Local\\node-gyp\\Cache\\20.6.1',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\ivand\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\ivand\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\20.6.1\\\\<(target_arch)\\\\node.lib',
gyp info spawn args '-Dmodule_root_dir=D:\\MyData\\PROGER\\JS\\Тестирование\\Tensorflow',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'D:\\MyData\\PROGER\\JS\\Тестирование\\Tensorflow\\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp: binding.gyp not found (cwd: D:\MyData\PROGER\JS\Тестирование\Tensorflow) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\ivand\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:270:18)
gyp ERR! stack at ChildProcess.emit (node:events:514:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "D:\\nodejs\\node.exe" "C:\\Users\\ivand\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\MyData\PROGER\JS\Тестирование\Tensorflow
gyp ERR! node -v v20.6.1
gyp ERR! node-gyp -v v10.0.0
gyp ERR! not ok

@gaikwadrahul8 gaikwadrahul8 self-assigned this Nov 3, 2023
@gaikwadrahul8
Copy link
Contributor

gaikwadrahul8 commented Nov 3, 2023

Hi, @el9in

Thank you for bringing this issue to our attention and could you please give it try by downgrading the Node.js version to 18.16.1 and please try with python 3.8,3.9 or 3.10 versions

Please try to install @tensorflow/tfjs-node@3.18.0 by using below command and let us know is it working as expected or not ? if issue still persists please help us with error log to investigate your issue further.

npm install --save-exact @tensorflow/tfjs-node@3.18.0

I believe you're following these official documentation Ref-1, Ref-2 and node-gyp - Node.js native addon build tool for Windows

In general you'll have to follow below steps to install @tensorflow/tfjs-node on Windows system:

  1. Edit the path user or system variable, ensure that the path to python is added to the path variable.
  2. Install Visual Studio community edition with desktop development with C++ Link
  3. Install visual studio build tools with the help of Visual Studio Installer
  4. Ensure that node-gyp is available: npm install -g node-gyp
  5. Install tfjs-node: npm install --save-exact @tensorflow/tfjs-node@3.18.0

Thank you!

@el9in
Copy link
Author

el9in commented Nov 3, 2023

Fixed, bug with napi-8 to napi-9, symlink.

@gaikwadrahul8
Copy link
Contributor

gaikwadrahul8 commented Nov 3, 2023

Hi, @el9in

If I understood correctly good to hear that your issue got resolved, team is working on bug napi-8 to napi-9 symlink which is currently happening with latest or most recent Node.js versions if I'm not wrong and we are already tracking this issue here #7341, you can refer that issue thread for future update and please feel free to close this issue if your issue got resolved. Thank you.

Copy link

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label Nov 17, 2023
Copy link

This issue was closed due to lack of activity after being marked stale for past 7 days.

Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants