Skip to content

Cant install on windows 11 #7793

@bbauti

Description

@bbauti

Help! i cant install tfjs on windows 11.

"npm i @tensorflow/tfjs-node@3.18" didnt work too

edit: running as admin didnt work too

node-gyp configure --verbose:

gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\Users\\bauti\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'configure',
gyp verb cli   '--verbose'
gyp verb cli ]
gyp info using node-gyp@9.4.0
gyp info using node@20.3.1 | win32 | x64
gyp verb command configure []
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if "python3" can be used
gyp verb find Python - executing "python3" to get executable path
gyp verb find Python - executable path is "C:\QMK_MSYS\mingw64\bin\python3.exe"
gyp verb find Python - executing "C:\QMK_MSYS\mingw64\bin\python3.exe" to get version
gyp verb find Python - version is "3.10.6"
gyp info find Python using Python version 3.10.6 found at "C:\QMK_MSYS\mingw64\bin\python3.exe"
gyp verb get node dir no --target version specified, falling back to host node version: 20.3.1
gyp verb command install [ '20.3.1' ]
gyp verb install input version string "20.3.1"
gyp verb install installing version: 20.3.1
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 11
gyp verb needs "installVersion" 11
gyp verb install version is good
gyp verb on Windows; need to check node.lib
gyp verb get node dir target node version installed: 20.3.1
gyp verb build dir attempting to create "build" dir: C:\Users\bauti\tfjs\build
gyp verb build dir "build" dir needed to be created? No
gyp verb find VS msvs_version not set from command line or npm config
gyp verb find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp verb find VS checking VS2022 (17.6.33815.320) found at:
gyp verb find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
gyp verb find VS - found "Visual Studio C++ core features"
gyp verb find VS - found VC++ toolset: v143
gyp verb find VS - found Windows SDK: 10.0.22000.0
gyp info find VS using VS2022 (17.6.33815.320) 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 verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: C:\Users\bauti\tfjs\build\config.gypi
gyp verb config.gypi checking for gypi file: C:\Users\bauti\tfjs\config.gypi
gyp verb common.gypi checking for gypi file: C:\Users\bauti\tfjs\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:\QMK_MSYS\mingw64\bin\python3.exe
gyp info spawn args [
gyp info spawn args   'C:\\Users\\bauti\\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   'C:\\Users\\bauti\\tfjs\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\bauti\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\bauti\\AppData\\Local\\node-gyp\\Cache\\20.3.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\\bauti\\AppData\\Local\\node-gyp\\Cache\\20.3.1',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\bauti\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\bauti\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\20.3.1\\\\<(target_arch)\\\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\bauti\\tfjs',
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   'C:\\Users\\bauti\\tfjs\\build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
Warning: Missing input files:
C:\Program Files
odejs
gyp info ok

npm install @tensorflow/tfjs-node:

npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\bauti\\AppData\\Roaming\\npm\\node_modules\\@tensorflow\\tfjs-node\\node_modules\\@mapbox',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\bauti\AppData\Roaming\npm\node_modules\@tensorflow\tfjs-node\node_modules\@mapbox\node-pre-gyp\lib'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\bauti\\AppData\\Roaming\\npm\\node_modules\\@tensorflow\\tfjs-node\\node_modules\\@mapbox\\node-pre-gyp\\lib'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\bauti\\AppData\\Roaming\\npm\\node_modules\\@tensorflow\\tfjs-node',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\bauti\AppData\Roaming\npm\node_modules\@tensorflow\tfjs-node\node_modules'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\bauti\\AppData\\Roaming\\npm\\node_modules\\@tensorflow\\tfjs-node\\node_modules'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\bauti\AppData\Roaming\npm\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.8.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 'C:\Users\bauti\AppData\Roaming\npm\node_modules\@tensorflow\tfjs-node\deps\lib\tensorflow.dll' -> 'C:\Users\bauti\AppData\Roaming\npm\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: 'C:\\Users\\bauti\\AppData\\Roaming\\npm\\node_modules\\@tensorflow\\tfjs-node\\deps\\lib\\tensorflow.dll',
npm ERR!   dest: 'C:\\Users\\bauti\\AppData\\Roaming\\npm\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v9\\tensorflow.dll'
npm ERR! }
npm ERR!
npm ERR! Node.js v20.3.1
npm ERR!
npm ERR!     at ChildProcess.exithandler (node:child_process:419:12)
npm ERR!     at ChildProcess.emit (node:events:511:28)
npm ERR!     at maybeClose (node:internal/child_process:1098:16)
npm ERR!     at ChildProcess._handle.onexit (node:internal/child_process:304: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! }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions