Error building TensorFlow in Rust


  • I am running an M1 Macbook Pro.
  • I have installed Rust recently using Homebrew.
  • I added tensorflow = '0.20 to my Cargo.toml file

Upon calling cargo build I get this error:

thread 'main' panicked at 'failed to execute cd "/Users/carlojacobs/.cargo/registry/src/" && "bazel" "build" "--jobs=8" "--compilation_mode=opt" "--copt=-march=native" "tensorflow:libtensorflow.dylib"', /Users/carlojacobs/.cargo/registry/src/

Here is the Rust TF crate link:

I have searched around a bit and read that it maybe has something to do with the fact that I’m on an M1 mac.

Any ideas?

I’m on an M1 Macbook Pro. I’m trying to build the Tensorflow crate for Rust

I added tensorflow = "0.20.0" to my Cargo.toml and ran cargo build I’m getting this error.

Any ideas?