# Installing tensorflow error on windows

**URL:** <https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847>\
**Category:** General\
**Created:** [27 August 2023 19:45 UTC](https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847 "2023-08-27T19:45:19Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahyash](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mahyash](https://discourse.nodered.org/u/mahyash)\
**Post date:** [27 August 2023 19:45 UTC](https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847/1 "2023-08-27T19:45:19Z")

</div>

Hi! I'm new with node-red and I wanted to install tensor flow, using this in cmd:

```auto
C:\Users\mahya>npm install @tensorflow/tfjs-node

```

But I keep getting this error. I even uninstalled Node.js and ticked the box to install necessary tools. But nothing has changed. Please help. Thanks.  
The error messages:

```auto
C:\Users\mahya>npm install @tensorflow/tfjs-node
npm ERR! code 1
npm ERR! path C:\Users\mahya\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.10.0.zip
npm ERR! * Downloading libtensorflow
npm ERR! C:\Users\mahya\node_modules\@tensorflow\tfjs-node\scripts\install.js:110
npm ERR! throw new Error(`Unsupported system: ${libType}-${platform}-${os.arch()}`);
npm ERR! ^
npm ERR!
npm ERR! Error: Unsupported system: cpu-win32-ia32
npm ERR! at getPlatformLibtensorflowUri (C:\Users\mahya\node_modules\@tensorflow\tfjs-node\scripts\install.js:110:11)
npm ERR! at downloadLibtensorflow (C:\Users\mahya\node_modules\@tensorflow\tfjs-node\scripts\install.js:143:15)
npm ERR! at async run (C:\Users\mahya\node_modules\@tensorflow\tfjs-node\scripts\install.js:212:5)
npm ERR!
npm ERR! Node.js v18.17.1

npm ERR! A complete log of this run can be found in: C:\Users\mahya\AppData\Local\npm-cache\_logs\2023-08-27T19_40_16_234Z-debug-0.log

C:\Users\mahya>npm install node-red-contrib-tf-model
npm ERR! code 1
npm ERR! path C:\Users\mahya\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.10.0.zip
npm ERR! * Downloading libtensorflow
npm ERR! C:\Users\mahya\node_modules\@tensorflow\tfjs-node\scripts\install.js:110
npm ERR! throw new Error(`Unsupported system: ${libType}-${platform}-${os.arch()}`);
npm ERR! ^
npm ERR!
npm ERR! Error: Unsupported system: cpu-win32-ia32
npm ERR! at getPlatformLibtensorflowUri (C:\Users\mahya\node_modules\@tensorflow\tfjs-node\scripts\install.js:110:11)
npm ERR! at downloadLibtensorflow (C:\Users\mahya\node_modules\@tensorflow\tfjs-node\scripts\install.js:143:15)
npm ERR! at async run (C:\Users\mahya\node_modules\@tensorflow\tfjs-node\scripts\install.js:212:5)
npm ERR!
npm ERR! Node.js v18.17.1

npm ERR! A complete log of this run can be found in: C:\Users\mahya\AppData\Local\npm-cache\_logs\2023-08-27T19_40_23_935Z-debug-0.log

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 August 2023 20:55 UTC](https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847/2 "2023-08-27T20:55:53Z")

</div>

> [@mahyash](#):
>
> `C:\Users\mahya>npm install @tensorflow/tfjs-node`

You should be installing it from the node-red userDir, which is probably c:/Users/mahya/.node-red, but I do not think that is the cause of the error.

npm ERR! Error: Unsupported system: cpu-win32-ia32

See [Error: Unsupported system: cpu-win32-ia32 · Issue #2772 · tensorflow/tfjs · GitHub](https://github.com/tensorflow/tfjs/issues/2772)  
I assume you are running a 32 bit version of Windows.

---

<div class="post-metadata">

**Author:** ![mahyash](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mahyash](https://discourse.nodered.org/u/mahyash)\
**Post date:** [28 August 2023 08:37 UTC](https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847/3 "2023-08-28T08:37:55Z")

</div>

No I just checked in the setting, I have and my device has 64-bit operating system, x64-based processor.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 August 2023 10:16 UTC](https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847/4 "2023-08-28T10:16:19Z")

</div>

Which version of windows and which version of nodejs are you using. For nodejs use `node -v` to find out.

---

<div class="post-metadata">

**Author:** ![mahyash](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mahyash](https://discourse.nodered.org/u/mahyash)\
**Post date:** [28 August 2023 10:20 UTC](https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847/5 "2023-08-28T10:20:37Z")

</div>

I use windows 10 Home version 22H2. I just downloaded another version of node js for x64. and it is: v20.5.1  
I tried to run this code and yet I got this error message:

```auto

C:\Windows\system32>npm install node-red-contrib-tensorflow
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\Windows\\system32\\node_modules\\@tensorflow\\tfjs',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Windows\system32\node_modules\@tensorflow\tfjs\node_modules\@tensorflow\tfjs-converter'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Windows\\system32\\node_modules\\@tensorflow\\tfjs\\node_modules\\@tensorflow\\tfjs-converter'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Windows\system32\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.1.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! C:\Windows\system32\node_modules\adm-zip\zipFile.js:101
npm ERR! if (!~endOffset) throw new Error(Utils.Errors.INVALID_FORMAT);
npm ERR! ^
npm ERR!
npm ERR! Error: Invalid or unsupported zip format. No END header found
npm ERR! at readMainHeader (C:\Windows\system32\node_modules\adm-zip\zipFile.js:101:32)
npm ERR! at new module.exports (C:\Windows\system32\node_modules\adm-zip\zipFile.js:19:9)
npm ERR! at new module.exports (C:\Windows\system32\node_modules\adm-zip\adm-zip.js:62:18)
npm ERR! at WriteStream.<anonymous> (C:\Windows\system32\node_modules\@tensorflow\tfjs-node\scripts\resources.js:72:29)
npm ERR! at WriteStream.emit (node:events:514:28)
npm ERR! at emitCloseNT (node:internal/streams/destroy:132:10)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
npm ERR!
npm ERR! Node.js v20.5.1

npm ERR! A complete log of this run can be found in: C:\Users\mahya\AppData\Local\npm-cache\_logs\2023-08-28T10_12_35_612Z-debug-0.log

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 August 2023 10:30 UTC](https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847/6 "2023-08-28T10:30:18Z")

</div>

You are still in the wrong folder, now you are trying to install it to system32, so you get the permissions error. You should be in your .node-red folder as I pointed out earlier.

---

<div class="post-metadata">

**Author:** ![mahyash](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mahyash](https://discourse.nodered.org/u/mahyash)\
**Post date:** [28 August 2023 10:35 UTC](https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847/7 "2023-08-28T10:35:44Z")

</div>

ok but this still doesn't work ☹

```auto
C:\Users\mahya\.node-red>npm install @tensorflow/tfjs-node
npm ERR! code 1
npm ERR! path C:\Users\mahya\.node-red\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.10.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! C:\Users\mahya\.node-red\node_modules\adm-zip\zipFile.js:101
npm ERR! if (!~endOffset) throw new Error(Utils.Errors.INVALID_FORMAT);
npm ERR! ^
npm ERR!
npm ERR! Error: Invalid or unsupported zip format. No END header found
npm ERR! at readMainHeader (C:\Users\mahya\.node-red\node_modules\adm-zip\zipFile.js:101:32)
npm ERR! at new module.exports (C:\Users\mahya\.node-red\node_modules\adm-zip\zipFile.js:19:9)
npm ERR! at new module.exports (C:\Users\mahya\.node-red\node_modules\adm-zip\adm-zip.js:62:18)
npm ERR! at WriteStream.<anonymous> (C:\Users\mahya\.node-red\node_modules\@tensorflow\tfjs-node\scripts\resources.js:72:29)
npm ERR! at WriteStream.emit (node:events:514:28)
npm ERR! at emitCloseNT (node:internal/streams/destroy:132:10)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
npm ERR!
npm ERR! Node.js v20.5.1

npm ERR! A complete log of this run can be found in: C:\Users\mahya\AppData\Local\npm-cache\_logs\2023-08-28T10_34_05_589Z-debug-0.log

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 August 2023 10:36 UTC](https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847/8 "2023-08-28T10:36:47Z")

</div>

Also note that nodejs 20 is not officially supported by node-red yet, so you would be better to stick to 18. Tensorflow probably hasn't been tested against 20 either.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 August 2023 10:43 UTC](https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847/9 "2023-08-28T10:43:02Z")

</div>

Though I would not expect the zip format error to be caused by the nodejs version. If you run the install again do you get the same error?

---

<div class="post-metadata">

**Author:** ![mahyash](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mahyash](https://discourse.nodered.org/u/mahyash)\
**Post date:** [28 August 2023 10:49 UTC](https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847/10 "2023-08-28T10:49:15Z")

</div>

you mean installing node-red again or Node.js?  
I uninstalled nodejs.20 and installed 18 again.  
but these errors are still here:

```auto
C:\Users\mahya\.node-red>npm install @tensorflow/tfjs-node
npm ERR! code 1
npm ERR! path C:\Users\mahya\.node-red\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.10.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! C:\Users\mahya\.node-red\node_modules\adm-zip\zipFile.js:101
npm ERR! if (!~endOffset) throw new Error(Utils.Errors.INVALID_FORMAT);
npm ERR! ^
npm ERR!
npm ERR! Error: Invalid or unsupported zip format. No END header found
npm ERR! at readMainHeader (C:\Users\mahya\.node-red\node_modules\adm-zip\zipFile.js:101:32)
npm ERR! at new module.exports (C:\Users\mahya\.node-red\node_modules\adm-zip\zipFile.js:19:9)
npm ERR! at new module.exports (C:\Users\mahya\.node-red\node_modules\adm-zip\adm-zip.js:62:18)
npm ERR! at WriteStream.<anonymous> (C:\Users\mahya\.node-red\node_modules\@tensorflow\tfjs-node\scripts\resources.js:72:29)
npm ERR! at WriteStream.emit (node:events:514:28)
npm ERR! at emitCloseNT (node:internal/streams/destroy:132:10)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
npm ERR!
npm ERR! Node.js v18.17.1

npm ERR! A complete log of this run can be found in: C:\Users\mahya\AppData\Local\npm-cache\_logs\2023-08-28T10_46_31_638Z-debug-0.log

C:\Users\mahya\.node-red>

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 August 2023 10:53 UTC](https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847/11 "2023-08-28T10:53:10Z")

</div>

I meant if you installer tensorflow again.

I suggest you submit an issue on the [node's github page](https://github.com/tensorflow/tfjs/issues). Hopefully the author will be able to help.

---

<div class="post-metadata">

**Author:** ![mahyash](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mahyash](https://discourse.nodered.org/u/mahyash)\
**Post date:** [28 August 2023 13:23 UTC](https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847/12 "2023-08-28T13:23:16Z")

</div>

Ok thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 October 2023 13:23 UTC](https://discourse.nodered.org/t/installing-tensorflow-error-on-windows/80847/13 "2023-10-27T13:23:39Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
