Skip to content

Unsupported system error when installing on M1 / Apple Silicon #4514

@nickplee

Description

@nickplee

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS 11.0.1 (20B29)
  • TensorFlow.js installed from (npm or script link): npm
  • TensorFlow.js version: 2.8.3

Describe the problem

Installation fails due to a missing precompiled libtensorflow for darwin / arm64.

Apple has their own fork of TensorFlow supporting their chips-- is there a way to tell the installation script to use their libtensorflow.dylib?

Provide the exact sequence of commands / steps that you executed before running into the problem

npm install @tensorflow/tfjs-node --save

Any other info / logs

npm ERR! code 1
npm ERR! path /Users/nicklee/Documents/Development/<redacted>/src/<redacted>/node_modules/@tensorflow/tfjs-node
npm ERR! command failed
npm ERR! command sh -c node scripts/install.js
npm ERR! CPU-darwin-2.8.3.tar.gz
npm ERR! * Downloading libtensorflow
npm ERR! /Users/nicklee/Documents/Development/<redacted>/src/<redacted>/node_modules/@tensorflow/tfjs-node/scripts/install.js:100
npm ERR!     throw new Error(`Unsupported system: ${libType}-${platform}-${os.arch()}`);
npm ERR!           ^
npm ERR! 
npm ERR! Error: Unsupported system: cpu-darwin-arm64
npm ERR!     at getPlatformLibtensorflowUri (/Users/nicklee/Documents/Development/<redacted>/src/<redacted>/node_modules/@tensorflow/tfjs-node/scripts/install.js:100:11)
npm ERR!     at downloadLibtensorflow (/Users/nicklee/Documents/Development/<redacted>/src/<redacted>/node_modules/@tensorflow/tfjs-node/scripts/install.js:134:7)
npm ERR!     at async run (/Users/nicklee/Documents/Development/<redacted>/src/<redacted>/node_modules/@tensorflow/tfjs-node/scripts/install.js:197:5)

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/nicklee/.npm/_logs/2021-01-09T02_53_09_673Z-debug.log

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions