Sigh. Here's a guide to make tensorflow-text work on M1.
I used miniforge to create a virtual environment and installed the latest version of tensorflow-macos (2.10).
To install tensorflow-text for M1, you can find the built wheel for M1 on github. I tried to add a link but the system didn't allow me to post this comment with that link (thanks btw that's really helpful /s)
I could only find a wheel for tensorflow-text v 2.9.
I tried to revert my tensorflow-macos to 2.9, but when I work with it, it throws an error "zsh: bus error". It's not fixable. So I have to stick to tensorflow-macos to 2.10.
Instead, you can build the wheel for tensorflow-text 2.10 from source on your machine. Clone the repository, checkout to tag 2.10, and build.
Make sure your conda environment is activated when you do this.
git clone https://github.com/tensorflow/text.git
cd text
git checkout tags/v2.10.0
./oss_scripts/run_build.sh
pip install tensorflow_text-2.10.0-cp39-cp39-macosx_11_0_arm64.whl
The compilation requires bazel version 5.3. For bazel, I recommend using brew install bazelisk -- this has caused me least trouble to set up.
This works for me, but it took way longer than I would have liked.