Error building TensorFlow in Rust

Hi!

  • 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/index.crates.io-6f17d22bba15001f/tensorflow-sys-0.23.0/target/source-v2.11.0" && "bazel" "build" "--jobs=8" "--compilation_mode=opt" "--copt=-march=native" "tensorflow:libtensorflow.dylib"', /Users/carlojacobs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tensorflow-sys-0.23.0/build.rs:428:9

Here is the Rust TF crate link: https://tensorflow.github.io/rust/tensorflow/index.html#

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?