Apple M1: illegal hardware instruction (using any rasa command)

Hi @Simskii, you’ll need a special build for both TensorFlow (see here) and sklearn (see here). The builds installed by poetry from pip using make install will not work.


I’ve installed TensorFlow and sklearn using the above links (important part seems to be using miniforge), and they both work. However, the Rasa installation doesn’t seem to work. Is it supposed to work on M1 now, given that I’ve already successfully installed TensorFlow and sklearn?

There’s not currently a build for the M1. I’ve been trying to build from source. Started with the steps described by Apple (see @fkoerner’s post above).

I removed the poetry.lock and ran the poetry install. You have to have bazel installed via homebrew (brew install bazel) and that got me past a few module issues.

At this point, the install of scipy-1.5.4 fails. A search of available versions of scipy shows that 1.5.4 is not available in miniforge. conda search -f tensorflow under miniforge shows 2.6.0 but not 2.6.2.

I’m in the same boat, my old Intel mac recently died, and now I’m unable to work on the rasa components of my project locally.

In the interim, for people with M1 macs, what are the best “cloud hosted” options for running Rasa and Rasa X (cheapest, easiest, etc.) If you are working with a hosted rasa env, please let us M1 folks know what works, what sucks, and what’s next :slight_smile:

I’d also be interested in options like running a VM either Docker or Parallels that is running linux or Windows, if that gets me to a local container running Rasa. I’ve tried Parallels and Docker without success so far.

You won’t be able to run in a container on the M1 either. Will run into qemu errors. I went to my local PC recycle place a bought a used i7 pc and loaded Ubuntu.


I currently need to be a bit of a nomad worker - family health issues… so I’m looking at maybe doing something like amazon workspaces when I’m doing rasa stuff. Anybody tried that for Rasa work? Cloud Native Persistent Desktop Virtualization – Amazon WorkSpaces Pricing – Amazon Web Services

But obviously, eventually the best way forward is running rasa on my M1… But being able to have rasa somewhere when I have a few hours to work is key… work arounds are the way, short term. Buying a used or low cost pc is a good idea too.


hey, after countless failure I managed to run RASA in docker using the --platform linux/amd64 option, but my 40 seconds training took 1 hour to run, so this counts as a failure also.

Then I switched to cloud VM. I am using PyCharm Professional locally on my M1 with an SSH interpreter connecting to a simple t3a.xlarge EC2 instance on AWS running Debian. I shut it down when I don’t work.


@szedjani Thanks for sharing this solution!! Looks like just the ticket for me too! I will not be working on the Rasa stuff for a few weeks now, but I’ll try to update here when I do, if there are any issues.

Thanks for taking the time to share your solution! :+1:

There is a 2.6.2 version of tensorflow now.

** tensorflow 2.6.2 cpu_py39h91c69d6_2 conda-forge**

does it work on M1?

I tried building 3.0.1 a few days ago and posted an update on the github issue. Until TensorFlow 2.7 is supported, we can’t get the latest numpy.

There’s a workaround for the numpy & spacy issue that would be worth trying but I haven’t had a chance to do this. Anyone want to give it a try?

1 Like

I will try it in the next couple of days, I have 2.7 working, at least in a jupyter notebook …

I followed this one: How To Install TensorFlow on M1 Mac (The Easy Way) | by Prabhat Kumar Sahu | Medium to install tf 2.7.

Is there any updates on getting rasa on M1?

Hey all, I found a kind of hacky way to install version 3.0.3 natively on my Macbook Pro with M1 processor, and have documented the steps here:

Would like to know if it works for you too. Happy holidays to all of you!


Thank you @khalo-sa! The basic Rasa install worked for me on my M1 iMac. I’m now testing it on my more complex model.

My configuration requires rasa transformers. I get the following tensorflow-addons error trying to install them. Any ideas? Thank you!

pip install rasa==3.0.3 transformers Requirement already satisfied: rasa==3.0.3 in …/rasa303/lib/python3.8/site-packages (3.0.3) Collecting transformers Using cached transformers-4.15.0-py3-none-any.whl (3.4 MB) Requirement already satisfied: numpy<1.20.0,>=1.19.2 in …/rasa303/lib/python3.8/site-packages (from rasa==3.0.3) (1.19.5)

Requirement already satisfied: CacheControl<0.13.0,>=0.12.9 in …/rasa303/lib/python3.8/site-packages (from rasa==3.0.3) (0.12.10)

Requirement already satisfied: pydot<1.5,>=1.4 in …/rasa303/lib/python3.8/site-packages (from rasa==3.0.3) (1.4.2)

Requirement already satisfied: PyJWT[crypto]<3.0.0,>=2.0.0 in …/rasa303/lib/python3.8/site-packages (from rasa==3.0.3) (2.1.0)

ERROR: Could not find a version that satisfies the requirement tensorflow-addons<0.15,>=0.14 (from rasa) (from versions: none)

ERROR: No matching distribution found for tensorflow-addons<0.15,>=0.14

Is it possible to get a different version of rasa?

Did you check my notes? I clearly say that you have to install Rasa via “pip install --no-deps rasa==3.0.3”. The “–no-deps” is very important :wink: So first do that, and then try to install transformers afterwards. However, I have no idea if it will work.