Running RASA on the RPi 4 with Raspbian Buster!

Hey @fuih,

That is exactly what it means - you should be able to run a server on the RPi. I have been able to successfully train and create a model on the RPi.

It sounds like you are working on an end2end personal assistant project - you can think of RASA in this case acting as the brain for your system. And it can do that. The whole reason why I decided to work with RASA was that I saw it had the flexibility to do all this.

If you are curious, here was the criterion I used to assess RASA:


And believe it or not, RASA checked off everything on this list.

Now, I think all the rest you have to do @fuih is to let your imagination run wild and see what you can do. :smiley: If you need any help getting this running on your RPi, we are here to support you!

Good luck making your RasaPi!

Yours, TheCedarPrince


你好,我确实这样运行了,但还是不行(要奔溃了)。我的树莓派是4B,python系统为2.7和3.7,我想知道我能不能在3.7上安装,因为安装py3.6一直有问题,还有对rasa的版本有什么要求吗?(前面我安装,rasa在rasa init时候发生错误)


Hey @1535966643,

I am using a translator - I am using simple words in English.

The tutorial was not made for Python 3.7. I cannot provide help there.

It is a good question to ask on the forum. I suggest making another post and ask about how to use python3.7 with the raspberry pi.

Thank you @TheCedarPrince, this is very awesome. Is there any hardware requirement of the RPi4 that we have to meet ? From what i see RPi4 can come with 1,2 or 4GB RAM, which one should be enough to run Rasa normally ?

Great question! I highly suggest the RPi4 with 4GB of RAM. I have not tested it otherwise and I do not know if it would work with less RAM.

Thank you @TheCedarPrince for the install-script. I’ve installed it in 32bit-mode on Rasbian (Buster) to the Pi4 with 4gb, After that, i saw that the Editor “Visual Studio Code” needs an 64bit-System to install. Is it enough to set the bootmode in raspbian to 64bit after the installation, or do I have to restart the installation?

Then i installed RASA X with some Errormassages …

pi@pi4:~ $ pip install rasa-x --extra-index-url Looking in indexes:,, Collecting rasa-x Downloading (1.6MB) |████████████████████████████████| 1.6MB 1.7MB/s Installing build dependencies … done Getting requirements to build wheel … done Preparing wheel metadata … done Collecting rasa~=1.4.0 Downloading (518kB) |████████████████████████████████| 522kB 1.5MB/s Collecting aiohttp~=3.5 Downloading (441kB) |████████████████████████████████| 450kB 7.3MB/s Collecting sanic-cors==0.9.9.post1 Downloading Collecting cryptography~=2.7 Downloading (504kB) |████████████████████████████████| 512kB 9.7MB/s Installing build dependencies … done Getting requirements to build wheel … done Preparing wheel metadata … done Requirement already satisfied: attrs>=18 in ./.local/lib/python3.6/site-packages (from rasa-x) (19.3.0) Collecting pyjwt Downloading Collecting pyyaml~=5.1 Downloading (265kB) |████████████████████████████████| 266kB 9.7MB/s Collecting SQLAlchemy~=1.3.0 Downloading (6.0MB) |████████████████████████████████| 6.0MB 101kB/s Requirement already satisfied: requests~=2.22 in ./.local/lib/python3.6/site-packages (from rasa-x) (2.22.0) Collecting jsonschema~=2.6.0 Downloading Collecting alembic~=1.0.10 Downloading (164kB) |████████████████████████████████| 174kB 962kB/s Collecting pika~=1.0.0 Downloading (148kB) |████████████████████████████████| 153kB 6.5MB/s Collecting questionary>=1.1.0 Downloading Collecting setuptools-scm~=3.3 Using cached Collecting apscheduler~=3.5 Downloading (58kB) |████████████████████████████████| 61kB 2.6MB/s Collecting sanic~=19.6 Downloading (73kB) |████████████████████████████████| 81kB 3.4MB/s Collecting sanic-jwt~=1.3 Downloading Collecting isodate~=0.6.0 Downloading (45kB) |████████████████████████████████| 51kB 2.7MB/s Collecting python-dateutil~=2.8 Downloading (227kB) |████████████████████████████████| 235kB 10.7MB/s Collecting kafka-python~=1.4 Downloading (266kB) |████████████████████████████████| 266kB 11.1MB/s Collecting python-telegram-bot~=11.0 Downloading (326kB) |████████████████████████████████| 327kB 10.9MB/s Collecting terminaltables~=3.1 Downloading Collecting scipy~=1.2 Using cached Installing build dependencies … done Getting requirements to build wheel … done Preparing wheel metadata … done Collecting colorhash~=1.0 Downloading Collecting coloredlogs~=10.0 Downloading (47kB) |████████████████████████████████| 51kB 1.2MB/s Collecting redis~=3.3.5 Downloading (66kB) |████████████████████████████████| 71kB 2.3MB/s Collecting slackclient~=1.3 Downloading Collecting networkx~=2.3.0 Downloading (1.7MB) |████████████████████████████████| 1.8MB 8.6MB/s Collecting gast==0.2.2 Downloading Collecting tensorflow-probability~=0.7.0 Using cached Collecting async-generator~=1.10 Downloading Collecting twilio~=6.0 Downloading (1.0MB) |████████████████████████████████| 1.0MB 792kB/s Collecting tensorflow~=1.14.0 Downloading (100.7MB) |████████████████████████████████| 100.7MB 12kB/s Collecting rasa-sdk~=1.4.0 Downloading Collecting matplotlib~=3.0 Downloading (37.8MB) |████████████████████████████████| 37.8MB 35kB/s Collecting scikit-learn~=0.20.2 Downloading (11.7MB) |████████████████████████████████| 11.7MB 79kB/s Collecting tensor2tensor~=1.14.0 Downloading (1.6MB) |████████████████████████████████| 1.6MB 9.4MB/s Collecting pytz~=2019.1 Downloading (509kB) |████████████████████████████████| 512kB 7.9MB/s Requirement already satisfied: tqdm~=4.0 in ./.local/lib/python3.6/site-packages (from rasa~=1.4.0->rasa-x) (4.38.0) Collecting absl-py>=0.8.0 Using cached Collecting colorclass~=2.2 Downloading Collecting gevent~=1.4 Using cached Collecting ruamel.yaml~=0.15.0 Downloading (318kB) |████████████████████████████████| 327kB 9.6MB/s Collecting python-engineio>=3.9.3 Downloading (120kB) |████████████████████████████████| 122kB 8.8MB/s Collecting fbmessenger~=6.0 Downloading Collecting pykwalify~=1.7.0 Downloading (40kB) |████████████████████████████████| 40kB 2.3MB/s Collecting mattermostwrapper~=2.0 Downloading Collecting jsonpickle~=1.1 Downloading Collecting webexteamssdk~=1.1 Downloading (82kB) |████████████████████████████████| 92kB 777kB/s Collecting pydot~=1.4 Downloading Collecting python-socketio>=4.3.1 Downloading (49kB) |████████████████████████████████| 51kB 2.0MB/s Collecting pymongo[srv,tls]~=3.8 Downloading (701kB) |████████████████████████████████| 706kB 9.0MB/s Requirement already satisfied: numpy~=1.16 in ./.local/lib/python3.6/site-packages (from rasa~=1.4.0->rasa-x) (1.17.3) Collecting sklearn-crfsuite~=0.3.6 Downloading Collecting rocketchat-API~=0.6.0 Downloading Requirement already satisfied: setuptools>=41.0.0 in ./.local/lib/python3.6/site-packages (from rasa~=1.4.0->rasa-x) (41.6.0) Requirement already satisfied: packaging~=19.0 in ./.local/lib/python3.6/site-packages (from rasa~=1.4.0->rasa-x) (19.2) Collecting boto3~=1.9 Downloading (128kB) |████████████████████████████████| 133kB 5.5MB/s Collecting multidict<5.0,>=4.5 Downloading (105kB) |████████████████████████████████| 112kB 8.7MB/s Collecting async-timeout<4.0,>=3.0 Downloading Collecting idna-ssl>=1.0; python_version < “3.7” Downloading Collecting yarl<2.0,>=1.0 Downloading (159kB) |████████████████████████████████| 163kB 10.3MB/s Collecting typing-extensions>=3.6.5; python_version < “3.7” Downloading Requirement already satisfied: chardet<4.0,>=2.0 in ./.local/lib/python3.6/site-packages (from aiohttp~=3.5->rasa-x) (3.0.4) Collecting sanic-plugins-framework>=0.8.2 Downloading Requirement already satisfied: six>=1.4.1 in ./.local/lib/python3.6/site-packages (from cryptography~=2.7->rasa-x) (1.13.0) Collecting cffi!=1.11.3,>=1.8 Using cached Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.6/site-packages (from requests~=2.22->rasa-x) (2019.9.11) Requirement already satisfied: idna<2.9,>=2.5 in ./.local/lib/python3.6/site-packages (from requests~=2.22->rasa-x) (2.8) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./.local/lib/python3.6/site-packages (from requests~=2.22->rasa-x) (1.25.6) Collecting python-editor>=0.3 Downloading Collecting Mako Downloading (75kB) |████████████████████████████████| 81kB 504kB/s Collecting prompt-toolkit~=2.0 Downloading (340kB) |████████████████████████████████| 348kB 8.7MB/s Collecting tzlocal>=1.2 Downloading Collecting ujson>=1.35; sys_platform != “win32” and implementation_name == “cpython” Downloading (192kB) |████████████████████████████████| 194kB 10.3MB/s Collecting requests-async==0.5.0 Downloading Collecting websockets<9.0,>=7.0 Downloading (58kB) |████████████████████████████████| 61kB 3.0MB/s WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ProtocolError(‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’,))’: /simple/aiofiles/ Collecting aiofiles>=0.3.0 Downloading Collecting uvloop>=0.5.3; sys_platform != “win32” and implementation_name == “cpython” Downloading (2.0MB) |████████████████████████████████| 2.0MB 6.4MB/s Collecting httptools>=0.0.10 Downloading (104kB) |████████████████████████████████| 112kB 8.5MB/s Collecting future>=0.16.0 Using cached Collecting humanfriendly>=4.7 Downloading (73kB) |████████████████████████████████| 81kB 1.5MB/s Collecting websocket-client<0.55.0,>=0.35 Downloading (200kB) |████████████████████████████████| 204kB 7.9MB/s Collecting decorator>=4.3.0 Downloading Collecting cloudpickle>=0.6.1 Using cached Collecting wrapt>=1.11.1 Downloading Collecting grpcio>=1.8.6 Downloading (14.9MB) |████████████████████████████████| 14.9MB 37kB/s Collecting astor>=0.6.0 Downloading Collecting tensorboard<1.15.0,>=1.14.0 Downloading (3.1MB) |████████████████████████████████| 3.2MB 11.1MB/s Collecting keras-preprocessing>=1.0.5 Downloading (41kB) |████████████████████████████████| 51kB 2.8MB/s Collecting termcolor>=1.1.0 Downloading Collecting protobuf>=3.6.1 Downloading (434kB) |████████████████████████████████| 440kB 7.8MB/s Collecting google-pasta>=0.1.6 Downloading (57kB) |████████████████████████████████| 61kB 2.9MB/s Collecting keras-applications>=1.0.6 Downloading (50kB) |████████████████████████████████| 51kB 2.5MB/s Collecting wheel>=0.26 Using cached Collecting tensorflow-estimator<1.15.0rc0,>=1.14.0rc0 Downloading (488kB) |████████████████████████████████| 491kB 10.0MB/s Collecting ConfigArgParse>=0.14 Downloading Collecting flask~=1.0 Using cached Collecting flask-cors~=3.0 Downloading Collecting cycler>=0.10 Downloading Collecting kiwisolver>=1.0.1 Downloading Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in ./.local/lib/python3.6/site-packages (from matplotlib~=3.0->rasa~=1.4.0->rasa-x) (2.4.5) Collecting dopamine-rl Downloading (77kB) |████████████████████████████████| 81kB 852kB/s Collecting tensorflow-datasets Using cached Collecting sympy Using cached WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ProtocolError(‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’,))’: /simple/kfac/ Collecting kfac Using cached Collecting gin-config Using cached Collecting gym Using cached Collecting h5py Using cached Collecting bz2file Using cached Collecting mesh-tensorflow Using cached Collecting gunicorn Using cached ERROR: Could not find a version that satisfies the requirement opencv-python (from tensor2tensor~=1.14.0->rasa~=1.4.0->rasa-x) (from versions: none) ERROR: No matching distribution found for opencv-python (from tensor2tensor~=1.14.0->rasa~=1.4.0->rasa-x) <<<

Thanks for help!

Hey @Rasatest,

  1. I do not know much about changing the architecture settings on the RPi - the issue of installing VSCode is outside the scope of this issue. Moreover, I tested this in a headless Raspbian image so I do not know how things would work in a desktop in this case.

  2. The area you are getting is when you install Rasa-X from pip. What you need to do is install it from source and remove tensor2tensor, dopamine, and open-cv from it’s file. Let me know if that works for you. :slight_smile:


hello,i has installed rasa,ending, my infomation of RPI 4 is rasa1.2X,python3.7,tf1.13.1.for example,please use ‘pip3 install rasa==1.2.9’ is ok.rasa’s version is very important that must 1.2X。

Could you please follow the instructions here and reply? I do not understand what your issue is currently.

It feels like I’m close to having the RasaPi docker image but it’s not quite there and I haven’t had a chance to get back to it the past week. I’m posting my Dockerfile on gist. Hoping someone can give it a try.

I installed Docker on my Pi by adding the following line to /etc/apt/sources.list raspbian-RELEASE main

Then run these commands:

sudo apt-get install -y
sudo apt install python3-pip
sudo pip3 install docker-compose

Then run the build:

sudo docker build .
1 Like

Hey @stephens, this looks like a great start.

I am going to break this conversation into another forum post as it pertains more to an issue with Docker rather than getting the Rasa on the Pi. I will tag you in the new post so you can provide more info about what is happening.


Hi @TheCedarPrince. I ran the script on freshly installed Raspian Buster but wasn’t able to run Rasa because it couldn’t find TensorFlow models. Do you know what would be causing this?

Hey @zshoaib - not entirely sure what the issue is but it appears you have an error here:

Should the name be “MemorizationPolicy” and not “MemoriationPolicy”? Seems like a typo.

Hi @TheCedarPrince. No, Memoization policy is a part of RASA policies: Policies

On second look, this looks a bit more involved than I initially thought. It would appear there is an issue with tensor2tensor - I will have to take a look at this more later. Right now, I am working with @stephens on developing a Dockerfile for easy installation - please check back a bit later. Will let you know what happens.

I’ve created an install script that you can see-get here. It does a clean install of the latest Rasa v1.60 on the current raspbian-buster(2019-09-26).

Mine is different from what others have posted earlier in the thread. It works fairly quickly and creates a clean install and allows Rasa models to run well from my testing on a Raspberry Pi4 or 3B+. But it fails in training mode! For my use-case it works…I train the model on a different computer and move it to the Pi where it does just fine.

I’d love to hear from others who might have a better handle as to trainning issues.

1 Like

Hi, it doesn’t work on my Pi 4 4Gb with Ubuntu server 19.10 64 bits

@TheCedarPrince @stephens @ziligy Thank you for all your work, I have trained a Rasa model on ubuntu PC using Rasa 1.7.0 and its working great,

But I wish to transfer the trained model from my Ubuntu to Raspberry Pi and then run on it,

  1. What are the steps I should follow to achieve above?
  2. Is the above scripts compatible with models trained using Rasa 1.7.0?
  3. I do not wish to train the model on Raspberry Pi but only run the model so which Raspberry Pi model I better invest on?

I am eagerly waiting for your answer, Thank you

I don’t think we can install Rasa on Raspberry :frowning: