Getting RASA to Work on the Raspberry Pi 4 (Buster)
See original GitHub issueRasa version: 1.3.8
Rasa X version: N/A
Python version: 3.5
Operating system (windows, osx, …): Raspbian Buster
Issue:
I am in the process of trying to install Rasa on my Raspberry Pi 4 (4GB RAM edition) and I continue running into an error with installing or-tools stating:
ERROR: Could not find a version that satisfies the requirement ortools (from mesh-tensorflow->tensor2tensor~=1.14.0->rasa) (from versions: none)
ERROR: No matching distribution found for ortools (from mesh-tensorflow->tensor2tensor~=1.14.0->rasa)
Any suggestions on any potential work-arounds?
Here is what I tried so far:
- I tried to build or-tools on an x86_64 based computer running linux. Once I had it successfully built, I transfered it to the Pi and even though I could import ortools, I could not perform any operations using it.
- Attempted to build or-tools on the Pi via these instructions but, given that the instructions are two years old and or-tools has changed dramatically, the process fails with the RPi’s CPU spiking to 300% before shutting off. I also tried this process on my linux computer and it almost overloaded my 8GB of RAM - so it is a fairly intensive task!
Another thought was to build a wheel for or-tools that could be compatible with arm7l architecture, but I do not know how feasible this is - it could be bundled with future releases of rasa.
Replication of Error Procedure
Here are the steps I took to get to this point; follow it completely to replicate my error:
-
Freshly install a new version of Raspbian Lite (Buster) on an SD Card
-
Run the following to update the Raspberry Pi:
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y
-
Install Berryconda package manager:
wget https://github.com/jjhelmus/berryconda/releases/download/v2.0.0/Berryconda3-2.0.0-Linux-armv7l.sh && chmod +x Berryconda3-2.0.0-Linux-armv7l.sh && ./Berryconda3-2.0.0-Linux-armv7l.sh && sudo reboot
-
Add RPI channel into conda:
conda config --add channels rpi
-
Install Python3.5 into conda:
conda install python=3.5 -y
-
Set-Up conda environment (we set-up with 3.5 so as to not encounter an error with open-cv):
A. Create conda environment:
conda create --name alpha python=3.5 pip -y
B. Update all packages in conda environment:
conda update --all -y && source activate alpha && pip install --upgrade pip setuptools wheel
-
Install rasa:
A. Install required system packages:
sudo apt-get install libatlas-base-dev python3-dev python3-pip libhdf5-dev -y
B. Reboot the computer
sudo reboot
C. Install rasa
source activate alpha && pip install rasa
Error (including full traceback):
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting rasa
Using cached https://files.pythonhosted.org/packages/94/04/183500ce584fc4dce09ccdb80e192f90ae5ba61553ace9e17b3f77c94a04/rasa-1.3.9-py3-none-any.whl
Collecting python-socketio>=4.3.1 (from rasa)
Downloading https://files.pythonhosted.org/packages/35/b0/22c3f785f23fec5c7a815f47c55d7e7946a67ae2129ff604148e939d3bdb/python_socketio-4.3.1-py2.py3-none-any.whl (49kB)
Collecting aiohttp~=3.5 (from rasa)
Downloading https://files.pythonhosted.org/packages/c2/f7/f0ad3dbace4762fef5d80aa4124b41bf218e4c4dd6d387a86cede707d9a4/aiohttp-3.6.2-py3-none-any.whl (441kB)
Collecting packaging~=19.0 (from rasa)
Downloading https://files.pythonhosted.org/packages/cf/94/9672c2d4b126e74c4496c6b3c58a8b51d6419267be9e70660ba23374c875/packaging-19.2-py2.py3-none-any.whl
Collecting async-generator~=1.10 (from rasa)
Using cached https://files.pythonhosted.org/packages/71/52/39d20e03abd0ac9159c162ec24b93fbcaa111e8400308f2465432495ca2b/async_generator-1.10-py3-none-any.whl
Collecting scikit-learn~=0.20.0 (from rasa)
Using cached https://www.piwheels.org/simple/scikit-learn/scikit_learn-0.20.4-cp35-cp35m-linux_armv7l.whl
Collecting networkx~=2.3 (from rasa)
Downloading https://files.pythonhosted.org/packages/85/08/f20aef11d4c343b557e5de6b9548761811eb16e438cee3d32b1c66c8566b/networkx-2.3.zip (1.7MB)
Collecting tensorflow-probability~=0.7.0 (from rasa)
Using cached https://files.pythonhosted.org/packages/3e/3a/c10b6c22320531c774402ac7186d1b673374e2a9d12502cbc8d811e4601c/tensorflow_probability-0.7.0-py2.py3-none-any.whl
Collecting fbmessenger~=6.0 (from rasa)
Downloading https://files.pythonhosted.org/packages/bd/e9/646684226176782b9e3b7dd5b35d7ecfd1d13cba24ad2e33255079921aab/fbmessenger-6.0.0-py2.py3-none-any.whl
Collecting tensorflow~=1.14.0 (from rasa)
Downloading https://www.piwheels.org/simple/tensorflow/tensorflow-1.14.0-cp35-none-linux_armv7l.whl (100.7MB)
Collecting sanic-jwt~=1.3 (from rasa)
Downloading https://www.piwheels.org/simple/sanic-jwt/sanic_jwt-1.3.2-py3-none-any.whl
Collecting SQLAlchemy~=1.3.0 (from rasa)
Downloading https://www.piwheels.org/simple/sqlalchemy/SQLAlchemy-1.3.10-cp35-cp35m-linux_armv7l.whl (1.2MB)
Collecting jsonpickle~=1.1 (from rasa)
Using cached https://files.pythonhosted.org/packages/07/07/c157520a3ebd166c8c24c6ae0ecae7c3968eb4653ff0e5af369bb82f004d/jsonpickle-1.2-py2.py3-none-any.whl
Collecting pymongo[srv,tls]~=3.8 (from rasa)
Downloading https://www.piwheels.org/simple/pymongo/pymongo-3.9.0-cp35-cp35m-linux_armv7l.whl (433kB)
Collecting python-telegram-bot~=11.0 (from rasa)
Downloading https://files.pythonhosted.org/packages/84/6c/47932a4041ee76650ad1f45a80e1422077e1e99c08a4d7a61cfbe5393d41/python_telegram_bot-11.1.0-py2.py3-none-any.whl (326kB)
Collecting sanic-cors~=0.9.0 (from rasa)
Using cached https://files.pythonhosted.org/packages/99/a6/1f2dce79cb38f0c7d8c846f7456ccd2a471d504cedb645b585e25406d737/Sanic_Cors-0.9.9.post3-py2.py3-none-any.whl
Collecting mattermostwrapper~=2.0 (from rasa)
Downloading https://files.pythonhosted.org/packages/93/70/203660597d12788e958dd691aa11c3c29caa075eadb2ce94d2eb53099d1b/mattermostwrapper-2.1-py2.py3-none-any.whl
Collecting tensor2tensor~=1.14.0 (from rasa)
Using cached https://files.pythonhosted.org/packages/20/eb/7159c5a12880c496893a5bf7242c23fdb4eed47ade683d111f2f2d4009b4/tensor2tensor-1.14.1-py2.py3-none-any.whl
Collecting absl-py>=0.8.0 (from rasa)
Downloading https://www.piwheels.org/simple/absl-py/absl_py-0.8.1-py3-none-any.whl (121kB)
Collecting pykwalify~=1.7.0 (from rasa)
Downloading https://files.pythonhosted.org/packages/36/9f/612de8ca540bd24d604f544248c4c46e9db76f6ea5eb75fb4244da6ebbf0/pykwalify-1.7.0-py2.py3-none-any.whl (40kB)
Collecting coloredlogs~=10.0 (from rasa)
Downloading https://files.pythonhosted.org/packages/08/0f/7877fc42fff0b9d70b6442df62d53b3868d3a6ad1b876bdb54335b30ff23/coloredlogs-10.0-py2.py3-none-any.whl (47kB)
Requirement already satisfied: setuptools>=41.0.0 in ./berryconda3/envs/alpha/lib/python3.5/site-packages (from rasa) (41.4.0)
Collecting apscheduler~=3.0 (from rasa)
Using cached https://files.pythonhosted.org/packages/09/ff/d5b0e81846cd5e92d02e5f2682b78c73a5d9d61bc1eae32cea5ac15c0d47/APScheduler-3.6.1-py2.py3-none-any.whl
Collecting simplejson~=3.16 (from rasa)
Using cached https://www.piwheels.org/simple/simplejson/simplejson-3.16.0-cp35-cp35m-linux_armv7l.whl
Collecting boto3~=1.9 (from rasa)
Using cached https://files.pythonhosted.org/packages/8c/49/cc8d900df85f69bce673510aacd0473aba958244516829d422720f584632/boto3-1.9.248-py2.py3-none-any.whl
Collecting pydot~=1.4 (from rasa)
Using cached https://files.pythonhosted.org/packages/33/d1/b1479a770f66d962f545c2101630ce1d5592d90cb4f083d38862e93d16d2/pydot-1.4.1-py2.py3-none-any.whl
Collecting attrs>=18 (from rasa)
Using cached https://files.pythonhosted.org/packages/6b/e8/2ecaf86b128a34e225807f03b22664302937ab826bd3b7eccab6754d29ea/attrs-19.2.0-py2.py3-none-any.whl
Collecting numpy~=1.16 (from rasa)
Downloading https://www.piwheels.org/simple/numpy/numpy-1.17.2-cp35-cp35m-linux_armv7l.whl (9.1MB)
Collecting twilio~=6.0 (from rasa)
Downloading https://files.pythonhosted.org/packages/0b/1e/e5b2acb5f73578aef493ce79cf3bab92f2236a4da9693409fc804caebf63/twilio-6.31.1-py2.py3-none-any.whl (1.0MB)
Collecting python-dateutil~=2.8 (from rasa)
Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Collecting requests>=2.20 (from rasa)
Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
Collecting colorclass~=2.2 (from rasa)
Using cached https://www.piwheels.org/simple/colorclass/colorclass-2.2.0-py3-none-any.whl
Collecting rasa-sdk~=1.3.0 (from rasa)
Downloading https://files.pythonhosted.org/packages/b2/95/ad9f2448be31be381ed2b1b01f0564ac505deac549423fa05a183aa9193b/rasa_sdk-1.3.3-py2.py3-none-any.whl
Collecting ruamel.yaml~=0.15.0 (from rasa)
Using cached https://www.piwheels.org/simple/ruamel-yaml/ruamel.yaml-0.15.100-cp35-cp35m-linux_armv7l.whl
Collecting pika~=1.0.0 (from rasa)
Using cached https://files.pythonhosted.org/packages/78/1a/28c98ee8b211be21d4a9f4ef1687c4d36f9302d47fcc28b81f9591abf6d8/pika-1.0.1-py2.py3-none-any.whl
Collecting pytz~=2019.1 (from rasa)
Using cached https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl
Collecting python-engineio>=3.9.3 (from rasa)
Using cached https://files.pythonhosted.org/packages/2b/20/8e3ba16102ae2e245d70d9cb9fa48b076253fdb036dc43eea142294c2897/python_engineio-3.9.3-py2.py3-none-any.whl
Collecting jsonschema~=2.6 (from rasa)
Using cached https://files.pythonhosted.org/packages/77/de/47e35a97b2b05c2fadbec67d44cfcdcd09b8086951b331d82de90d2912da/jsonschema-2.6.0-py2.py3-none-any.whl
Collecting questionary>=1.1.0 (from rasa)
Using cached https://files.pythonhosted.org/packages/c2/f9/8a6e7fce60566b3bcdc5ad0923916f38a65bca630ce3647251e672308bdf/questionary-1.3.0-py3-none-any.whl
Collecting slackclient~=1.3 (from rasa)
Using cached https://www.piwheels.org/simple/slackclient/slackclient-1.3.2-py2.py3-none-any.whl
Collecting rocketchat-API~=0.6.0 (from rasa)
Downloading https://files.pythonhosted.org/packages/e2/36/29d991028e2943b6a12abe12e3114a4cce13872283df7c7b784ee4cb59ed/rocketchat_API-0.6.34-py3-none-any.whl
Collecting terminaltables~=3.1 (from rasa)
Using cached https://www.piwheels.org/simple/terminaltables/terminaltables-3.1.0-py3-none-any.whl
Collecting redis~=3.3.5 (from rasa)
Downloading https://files.pythonhosted.org/packages/cc/ed/c7447328a3d9fb26961ca4ee877629a9514705b9442d3179456cb860c70f/redis-3.3.10-py2.py3-none-any.whl (66kB)
Collecting sanic~=19.3.1 (from rasa)
Using cached https://files.pythonhosted.org/packages/90/11/31382617b33f89df0caca396f104628d256689a58a63c75d3e46663a8c8f/sanic-19.3.1-py3-none-any.whl
Collecting matplotlib~=3.0 (from rasa)
Downloading https://www.piwheels.org/simple/matplotlib/matplotlib-3.0.3-cp35-cp35m-linux_armv7l.whl (10.9MB)
Collecting gast==0.2.2 (from rasa)
Downloading https://www.piwheels.org/simple/gast/gast-0.2.2-py3-none-any.whl
Collecting colorhash~=1.0 (from rasa)
Using cached https://files.pythonhosted.org/packages/0e/e1/50dbc513aa74e99eca4c47f2a8206711f0bec436fdddd95eebaf7eaaa1aa/colorhash-1.0.2-py2.py3-none-any.whl
Collecting sklearn-crfsuite~=0.3.6 (from rasa)
Downloading https://files.pythonhosted.org/packages/25/74/5b7befa513482e6dee1f3dd68171a6c9dfc14c0eaa00f885ffeba54fe9b0/sklearn_crfsuite-0.3.6-py2.py3-none-any.whl
Collecting gevent~=1.4 (from rasa)
Downloading https://www.piwheels.org/simple/gevent/gevent-1.4.0-cp35-cp35m-linux_armv7l.whl (5.6MB)
Collecting kafka-python~=1.4 (from rasa)
Downloading https://files.pythonhosted.org/packages/49/c9/9863483a1353700ba87821b4f39085eb18fd1bcbb1e954c697177d67f03f/kafka_python-1.4.7-py2.py3-none-any.whl (266kB)
Collecting PyJWT~=1.7 (from rasa)
Using cached https://files.pythonhosted.org/packages/87/8b/6a9f14b5f781697e51259d81657e6048fd31a113229cf346880bb7545565/PyJWT-1.7.1-py2.py3-none-any.whl
Collecting webexteamssdk~=1.1 (from rasa)
Downloading https://www.piwheels.org/simple/webexteamssdk/webexteamssdk-1.2-py3-none-any.whl (82kB)
Collecting scipy~=1.2 (from rasa)
Downloading https://www.piwheels.org/simple/scipy/scipy-1.3.1-cp35-cp35m-linux_armv7l.whl (37.9MB)
Collecting tqdm~=4.0 (from rasa)
Using cached https://files.pythonhosted.org/packages/e1/c1/bc1dba38b48f4ae3c4428aea669c5e27bd5a7642a74c8348451e0bd8ff86/tqdm-4.36.1-py2.py3-none-any.whl
Collecting six>=1.9.0 (from python-socketio>=4.3.1->rasa)
Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting multidict<5.0,>=4.5 (from aiohttp~=3.5->rasa)
Downloading https://www.piwheels.org/simple/multidict/multidict-4.5.2-cp35-cp35m-linux_armv7l.whl (301kB)
Collecting yarl<2.0,>=1.0 (from aiohttp~=3.5->rasa)
Downloading https://www.piwheels.org/simple/yarl/yarl-1.3.0-cp35-cp35m-linux_armv7l.whl (227kB)
Collecting chardet<4.0,>=2.0 (from aiohttp~=3.5->rasa)
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
Collecting typing-extensions>=3.6.5; python_version < "3.7" (from aiohttp~=3.5->rasa)
Downloading https://files.pythonhosted.org/packages/27/aa/bd1442cfb0224da1b671ab334d3b0a4302e4161ea916e28904ff9618d471/typing_extensions-3.7.4-py3-none-any.whl
Collecting async-timeout<4.0,>=3.0 (from aiohttp~=3.5->rasa)
Downloading https://files.pythonhosted.org/packages/e1/1e/5a4441be21b0726c4464f3f23c8b19628372f606755a9d2e46c187e65ec4/async_timeout-3.0.1-py3-none-any.whl
Collecting idna-ssl>=1.0; python_version < "3.7" (from aiohttp~=3.5->rasa)
Downloading https://www.piwheels.org/simple/idna-ssl/idna_ssl-1.1.0-py3-none-any.whl
Collecting pyparsing>=2.0.2 (from packaging~=19.0->rasa)
Downloading https://files.pythonhosted.org/packages/11/fa/0160cd525c62d7abd076a070ff02b2b94de589f1a9789774f17d7c54058e/pyparsing-2.4.2-py2.py3-none-any.whl (65kB)
Collecting decorator>=4.3.0 (from networkx~=2.3->rasa)
Downloading https://files.pythonhosted.org/packages/5f/88/0075e461560a1e750a0dcbf77f1d9de775028c37a19a346a6c565a257399/decorator-4.4.0-py2.py3-none-any.whl
Collecting cloudpickle>=0.6.1 (from tensorflow-probability~=0.7.0->rasa)
Downloading https://files.pythonhosted.org/packages/c1/49/334e279caa3231255725c8e860fa93e72083567625573421db8875846c14/cloudpickle-1.2.2-py2.py3-none-any.whl
Collecting astor>=0.6.0 (from tensorflow~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/d1/4f/950dfae467b384fc96bc6469de25d832534f6b4441033c39f914efd13418/astor-0.8.0-py2.py3-none-any.whl
Collecting tensorflow-estimator<1.15.0rc0,>=1.14.0rc0 (from tensorflow~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/3c/d5/21860a5b11caf0678fbc8319341b0ae21a07156911132e0e71bffed0510d/tensorflow_estimator-1.14.0-py2.py3-none-any.whl (488kB)
Collecting keras-preprocessing>=1.0.5 (from tensorflow~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/28/6a/8c1f62c37212d9fc441a7e26736df51ce6f0e38455816445471f10da4f0a/Keras_Preprocessing-1.1.0-py2.py3-none-any.whl (41kB)
Collecting protobuf>=3.6.1 (from tensorflow~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/ad/c2/86c65136e280607ddb2e5dda19e2953c1174f9919b557d1d154574481de4/protobuf-3.10.0-py2.py3-none-any.whl (434kB)
Requirement already satisfied: wheel>=0.26 in ./berryconda3/envs/alpha/lib/python3.5/site-packages (from tensorflow~=1.14.0->rasa) (0.33.6)
Collecting grpcio>=1.8.6 (from tensorflow~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/14/ea/227e7055604ec319544def1b83a8506f084fc2e985b1ac4b84e04bf2c78e/grpcio-1.24.1-cp35-cp35m-linux_armv7l.whl (12.7MB)
Collecting tensorboard<1.15.0,>=1.14.0 (from tensorflow~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/91/2d/2ed263449a078cd9c8a9ba50ebd50123adf1f8cfbea1492f9084169b89d9/tensorboard-1.14.0-py3-none-any.whl (3.1MB)
Collecting termcolor>=1.1.0 (from tensorflow~=1.14.0->rasa)
Downloading https://www.piwheels.org/simple/termcolor/termcolor-1.1.0-py3-none-any.whl
Collecting keras-applications>=1.0.6 (from tensorflow~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/71/e3/19762fdfc62877ae9102edf6342d71b28fbfd9dea3d2f96a882ce099b03f/Keras_Applications-1.0.8-py3-none-any.whl (50kB)
Collecting wrapt>=1.11.1 (from tensorflow~=1.14.0->rasa)
Downloading https://www.piwheels.org/simple/wrapt/wrapt-1.11.2-cp35-cp35m-linux_armv7l.whl (66kB)
Collecting google-pasta>=0.1.6 (from tensorflow~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/d0/33/376510eb8d6246f3c30545f416b2263eee461e40940c2a4413c711bdf62d/google_pasta-0.1.7-py3-none-any.whl (52kB)
Collecting dnspython<2.0.0,>=1.16.0; extra == "srv" (from pymongo[srv,tls]~=3.8->rasa)
Downloading https://files.pythonhosted.org/packages/ec/d3/3aa0e7213ef72b8585747aa0e271a9523e713813b9a20177ebe1e939deb0/dnspython-1.16.0-py2.py3-none-any.whl (188kB)
Collecting future>=0.16.0 (from python-telegram-bot~=11.0->rasa)
Downloading https://www.piwheels.org/simple/future/future-0.18.0-py3-none-any.whl (490kB)
Requirement already satisfied: certifi in ./berryconda3/envs/alpha/lib/python3.5/site-packages (from python-telegram-bot~=11.0->rasa) (2018.8.24)
Collecting cryptography (from python-telegram-bot~=11.0->rasa)
Downloading https://www.piwheels.org/simple/cryptography/cryptography-2.7-cp35-cp35m-linux_armv7l.whl (782kB)
Collecting sanic-plugins-framework>=0.8.2 (from sanic-cors~=0.9.0->rasa)
Downloading https://files.pythonhosted.org/packages/ac/a6/258bdd353c22c3ff7f130d1c788f874a88e48d306614d2f622f3bac2576b/Sanic_Plugins_Framework-0.8.2-py2.py3-none-any.whl
Collecting kfac (from tensor2tensor~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/01/f0/4a7758f854a15b37d322827123ce58619d0f4270dd94f2dd30328f397339/kfac-0.2.0-py2.py3-none-any.whl (178kB)
Collecting gin-config (from tensor2tensor~=1.14.0->rasa)
Downloading https://www.piwheels.org/simple/gin-config/gin_config-0.2.1-py3-none-any.whl
Collecting gunicorn (from tensor2tensor~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/8c/da/b8dd8deb741bff556db53902d4706774c8e1e67265f69528c14c003644e6/gunicorn-19.9.0-py2.py3-none-any.whl (112kB)
Collecting flask (from tensor2tensor~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/9b/93/628509b8d5dc749656a9641f4caf13540e2cdec85276964ff8f43bbb1d3b/Flask-1.1.1-py2.py3-none-any.whl (94kB)
Collecting mesh-tensorflow (from tensor2tensor~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/f1/63/77b1b1e9a037aed5c6c42a264b6340093ddcf5a3cb06713f5b50bfb966b4/mesh_tensorflow-0.1.0-py2.py3-none-any.whl (221kB)
Collecting tensorflow-gan (from tensor2tensor~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/3e/94/8903150ffafdd538b18e6d24dbd4f5a07105d9d31a29db49e728ae2a8b13/tensorflow_gan-1.0.0.dev0-py2.py3-none-any.whl (317kB)
Collecting bz2file (from tensor2tensor~=1.14.0->rasa)
Downloading https://www.piwheels.org/simple/bz2file/bz2file-0.98-py3-none-any.whl
Collecting dopamine-rl (from tensor2tensor~=1.14.0->rasa)
Downloading https://www.piwheels.org/simple/dopamine-rl/dopamine_rl-2.0.5-py3-none-any.whl (77kB)
Collecting gym (from tensor2tensor~=1.14.0->rasa)
Downloading https://www.piwheels.org/simple/gym/gym-0.15.3-py3-none-any.whl (1.6MB)
Collecting pypng (from tensor2tensor~=1.14.0->rasa)
Downloading https://www.piwheels.org/simple/pypng/pypng-0.0.20-py3-none-any.whl (67kB)
Collecting sympy (from tensor2tensor~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/21/21/f4105795ca7f35c541d82c5b06be684dd2f5cb4f508fb487cd7aea4de776/sympy-1.4-py2.py3-none-any.whl (5.3MB)
Collecting oauth2client (from tensor2tensor~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/95/a9/4f25a14d23f0786b64875b91784607c2277eff25d48f915e39ff0cff505a/oauth2client-4.1.3-py2.py3-none-any.whl (98kB)
Collecting tensorflow-datasets (from tensor2tensor~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/6c/34/ff424223ed4331006aaa929efc8360b6459d427063dc59fc7b75d7e4bab3/tensorflow_datasets-1.2.0-py3-none-any.whl (2.3MB)
Collecting opencv-python (from tensor2tensor~=1.14.0->rasa)
Downloading https://www.piwheels.org/simple/opencv-python/opencv_python-3.4.4.19-cp35-cp35m-linux_armv7l.whl (7.4MB)
Collecting google-api-python-client (from tensor2tensor~=1.14.0->rasa)
Downloading https://www.piwheels.org/simple/google-api-python-client/google_api_python_client-1.7.11-py3-none-any.whl (56kB)
Collecting Pillow (from tensor2tensor~=1.14.0->rasa)
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/pillow/
Downloading https://www.piwheels.org/simple/pillow/Pillow-6.2.0-cp35-cp35m-linux_armv7l.whl (1.1MB)
Collecting h5py (from tensor2tensor~=1.14.0->rasa)
Downloading https://www.piwheels.org/simple/h5py/h5py-2.10.0-cp35-cp35m-linux_armv7l.whl (3.5MB)
Collecting docopt>=0.6.2 (from pykwalify~=1.7.0->rasa)
Downloading https://www.piwheels.org/simple/docopt/docopt-0.6.2-py2.py3-none-any.whl
Collecting PyYAML>=3.11 (from pykwalify~=1.7.0->rasa)
Downloading https://www.piwheels.org/simple/pyyaml/PyYAML-5.1.2-cp35-cp35m-linux_armv7l.whl (45kB)
Collecting humanfriendly>=4.7 (from coloredlogs~=10.0->rasa)
Downloading https://files.pythonhosted.org/packages/90/df/88bff450f333114680698dc4aac7506ff7cab164b794461906de31998665/humanfriendly-4.18-py2.py3-none-any.whl (73kB)
Collecting tzlocal>=1.2 (from apscheduler~=3.0->rasa)
Downloading https://files.pythonhosted.org/packages/ef/99/53bd1ac9349262f59c1c421d8fcc2559ae8a5eeffed9202684756b648d33/tzlocal-2.0.0-py2.py3-none-any.whl
Collecting botocore<1.13.0,>=1.12.248 (from boto3~=1.9->rasa)
Downloading https://files.pythonhosted.org/packages/50/5c/922cc8c2cdcb905e96bd73dc2064939bc9157e9e1d4c44e54e775cd2cddc/botocore-1.12.248-py2.py3-none-any.whl (5.7MB)
Collecting s3transfer<0.3.0,>=0.2.0 (from boto3~=1.9->rasa)
Downloading https://files.pythonhosted.org/packages/16/8a/1fc3dba0c4923c2a76e1ff0d52b305c44606da63f718d14d3231e21c51b0/s3transfer-0.2.1-py2.py3-none-any.whl (70kB)
Collecting jmespath<1.0.0,>=0.7.1 (from boto3~=1.9->rasa)
Downloading https://files.pythonhosted.org/packages/83/94/7179c3832a6d45b266ddb2aac329e101367fbdb11f425f13771d27f225bb/jmespath-0.9.4-py2.py3-none-any.whl
Collecting pysocks; python_version >= "3.0" (from twilio~=6.0->rasa)
Downloading https://files.pythonhosted.org/packages/8d/59/b4572118e098ac8e46e399a1dd0f2d85403ce8bbaad9ec79373ed6badaf9/PySocks-1.7.1-py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests>=2.20->rasa)
Downloading https://files.pythonhosted.org/packages/e0/da/55f51ea951e1b7c63a579c09dd7db825bb730ec1fe9c0180fc77bfb31448/urllib3-1.25.6-py2.py3-none-any.whl (125kB)
Collecting idna<2.9,>=2.5 (from requests>=2.20->rasa)
Downloading https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)
Collecting flask-cors~=3.0 (from rasa-sdk~=1.3.0->rasa)
Downloading https://files.pythonhosted.org/packages/78/38/e68b11daa5d613e3a91e4bf3da76c94ac9ee0d9cd515af9c1ab80d36f709/Flask_Cors-3.0.8-py2.py3-none-any.whl
Collecting ConfigArgParse~=0.14 (from rasa-sdk~=1.3.0->rasa)
Downloading https://www.piwheels.org/simple/configargparse/ConfigArgParse-0.15.1-py3-none-any.whl
Collecting prompt-toolkit~=2.0 (from questionary>=1.1.0->rasa)
Downloading https://files.pythonhosted.org/packages/87/61/2dfea88583d5454e3a64f9308a686071d58d59a55db638268a6413e1eb6d/prompt_toolkit-2.0.10-py3-none-any.whl (340kB)
Collecting websocket-client<0.55.0,>=0.35 (from slackclient~=1.3->rasa)
Downloading https://files.pythonhosted.org/packages/26/2d/f749a5c82f6192d77ed061a38e02001afcba55fe8477336d26a950ab17ce/websocket_client-0.54.0-py2.py3-none-any.whl (200kB)
Collecting uvloop>=0.5.3; sys_platform != "win32" and implementation_name == "cpython" (from sanic~=19.3.1->rasa)
Downloading https://www.piwheels.org/simple/uvloop/uvloop-0.13.0-cp35-cp35m-linux_armv7l.whl (3.2MB)
Collecting httptools>=0.0.10 (from sanic~=19.3.1->rasa)
Downloading https://www.piwheels.org/simple/httptools/httptools-0.0.13-cp35-cp35m-linux_armv7l.whl (207kB)
Collecting aiofiles>=0.3.0 (from sanic~=19.3.1->rasa)
Downloading https://files.pythonhosted.org/packages/cf/f2/a67a23bc0bb61d88f82aa7fb84a2fb5f278becfbdc038c5cbb36c31feaf1/aiofiles-0.4.0-py3-none-any.whl
Collecting ujson>=1.35; sys_platform != "win32" and implementation_name == "cpython" (from sanic~=19.3.1->rasa)
Downloading https://www.piwheels.org/simple/ujson/ujson-1.35-cp35-cp35m-linux_armv7l.whl (72kB)
Collecting websockets<7.0,>=6.0 (from sanic~=19.3.1->rasa)
Downloading https://www.piwheels.org/simple/websockets/websockets-6.0-cp35-cp35m-linux_armv7l.whl (92kB)
Collecting cycler>=0.10 (from matplotlib~=3.0->rasa)
Downloading https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Collecting kiwisolver>=1.0.1 (from matplotlib~=3.0->rasa)
Downloading https://www.piwheels.org/simple/kiwisolver/kiwisolver-1.1.0-cp35-cp35m-linux_armv7l.whl (912kB)
Collecting python-crfsuite>=0.8.3 (from sklearn-crfsuite~=0.3.6->rasa)
Downloading https://www.piwheels.org/simple/python-crfsuite/python_crfsuite-0.9.6-cp35-cp35m-linux_armv7l.whl (659kB)
Collecting tabulate (from sklearn-crfsuite~=0.3.6->rasa)
Downloading https://www.piwheels.org/simple/tabulate/tabulate-0.8.5-py3-none-any.whl
Collecting greenlet>=0.4.14; platform_python_implementation == "CPython" (from gevent~=1.4->rasa)
Downloading https://www.piwheels.org/simple/greenlet/greenlet-0.4.15-cp35-cp35m-linux_armv7l.whl (42kB)
Collecting requests-toolbelt (from webexteamssdk~=1.1->rasa)
Downloading https://files.pythonhosted.org/packages/60/ef/7681134338fc097acef8d9b2f8abe0458e4d87559c689a8c306d0957ece5/requests_toolbelt-0.9.1-py2.py3-none-any.whl (54kB)
Collecting markdown>=2.6.8 (from tensorboard<1.15.0,>=1.14.0->tensorflow~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/c0/4e/fd492e91abdc2d2fcb70ef453064d980688762079397f779758e055f6575/Markdown-3.1.1-py2.py3-none-any.whl (87kB)
Collecting werkzeug>=0.11.15 (from tensorboard<1.15.0,>=1.14.0->tensorflow~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/ce/42/3aeda98f96e85fd26180534d36570e4d18108d62ae36f87694b476b83d6f/Werkzeug-0.16.0-py2.py3-none-any.whl (327kB)
Collecting asn1crypto>=0.21.0 (from cryptography->python-telegram-bot~=11.0->rasa)
Downloading https://files.pythonhosted.org/packages/6e/1e/fb0e487b5229e5fb7b15c6d00b4e8082a3414fe62b1da4c9a905b106e672/asn1crypto-1.1.0-py2.py3-none-any.whl (103kB)
Collecting cffi!=1.11.3,>=1.8 (from cryptography->python-telegram-bot~=11.0->rasa)
Downloading https://www.piwheels.org/simple/cffi/cffi-1.12.3-cp35-cp35m-linux_armv7l.whl (310kB)
Collecting click>=5.1 (from flask->tensor2tensor~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl (81kB)
Collecting Jinja2>=2.10.1 (from flask->tensor2tensor~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/65/e0/eb35e762802015cab1ccee04e8a277b03f1d8e53da3ec3106882ec42558b/Jinja2-2.10.3-py2.py3-none-any.whl (125kB)
Collecting itsdangerous>=0.24 (from flask->tensor2tensor~=1.14.0->rasa)
Downloading https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl
Collecting ortools (from mesh-tensorflow->tensor2tensor~=1.14.0->rasa)
ERROR: Could not find a version that satisfies the requirement ortools (from mesh-tensorflow->tensor2tensor~=1.14.0->rasa) (from versions: none)
ERROR: No matching distribution found for ortools (from mesh-tensorflow->tensor2tensor~=1.14.0->rasa)
Command which led to error:
pip install rasa
If you have any questions, feel free to reach out - I hope we can get this working!
Issue Analytics
- State:
- Created 4 years ago
- Comments:48 (25 by maintainers)
Top GitHub Comments
Hi guys, (@wochinge @TheCedarPrince @akelad)
I was now able to set everything up properly. I had the following setup, but tried to make everything as flexible as possible so at least Raspian 9 should be supported aswell:
Device: Raspberry Pi 4 OS: Raspbian 10 Python: 3.6.8 Frameworks to install: Tensorflow, SpaCy, Rasa
The following steps are necessary or recommended:
sudo apt-get update && apt-get upgrade
python 3.7.3
as default - which currently is not officially supported by Tensorflow. To workaround this, we are going to installpython 3.6.8
in several steps. Note thatbz2
is needed by Rasa and not per default compiled with python.2.1 Install the bzip2 development library with
sudo apt-get install libbz2-dev libssl-dev
2.2 Download the python 3.6.8 tarfile 2.3 Enter the following commands in your terminal:To confirm that your installation works, you can do:
python3.6 -m pip install --upgrade pip --user
andpython3.6 -m pip install --upgrade setuptools --user
(necessary to be able to install the latest wheels/libs)python3.6 -m pip install tensorflow==1.14.0 --user
There should not occur problems until this point. Now things are getting a bit more complicated since we are entering areas where compatibility is not given and we need to build/modify things. First of all we need to clone certain repositories (clone in separate directories is recommended):
a.
git clone https://github.com/explosion/spaCy
b.git clone https://github.com/tensorflow/tensor2tensor
c.wget https://github.com/RasaHQ/rasa/archive/1.4.0.zip
Follow this OpenCV tutorial from step 2 on until OpenCV is successfully installed. You should be able to do “import cv2” in python3.6 then. If there is an error, don’t worry - OpenCV is not mandatory.
Execute the following command in terminal:
export BLIS_ARCH=generic
(blis is used for computational purposes and mandatory for spacy)Move into the spaCy folder and use
python3.6 -m pip install -r requirements.txt --user
Move into the spaCy folder and execute
python setup.py build_ext --inplace
Move into the spaCy folder and execute
python3.6 -m pip install . --user
Execute the following command in terminal:
python3.6 -m pip install dopamine-rl --user --no-deps
(there is a cyclic behaviour in the dependencies of dopamine which is a dependency of tensor2tensor so we are just simplifying things here).Move into the tensor2tensor folder and remove the following dependency from setup.py:
opencv-python
(we have installed this previously but there is no symlink created so python won’t find it easily)Move into the tensor2tensor folder and use
python3.6 -m pip install . --user --force-reinstall
At this time, we have successfully installed Tensorflow, SpaCy and several dependencies that are getting important now.
sudo apt install python3-dev && apt install libpq-dev/buster
(per default, there is to postgres system installed but rasa has the requirement psycopg2)python3.6 -m pip install psycopg2 --user
tensor2tensor
(we have installed this previously)python3.6 -m pip install -r requirements.txt --user --force-reinstall
python3.6 -m pip install . --user --force-reinstall
Now you should be able to run:
python3.6 -m rasa init
and e.g. usepretrained_embeddings_spacy
as a pipeline (assuming you downloaded at least one model from spacy).General notes:
The main problems are missing wheels for Raspbian/Debian 10, compatibility issues with various python versions and the fact, that arm7 is not the widest supported architecture. However, the performance is really good in terms of training/usage time.
--user
I want to avoid system issues with the python/user versions currently installed on the Pi--force-reinstall
this is mostly due to the fact, that so many libraries force specific dependency versions and I assume a hierarchical order in them. I try to minimize the incompatibility warnings and want to ensure, that the “biggest” library gets its willOf course this guide may not work for your specific scenario. Mostly this is because there are so many situations/systems/environments that I can’t cover them all. This guide worked for me even after the third complete reinstall of my Pi so I assume you can either use it directly or getting the idea behind my approach. I am deeply sorry in case I missed a step. I needed 3 full days to work things out and tons of coffee and love of my wife that calmed be down everytime I was on a rampage 😄 So please use my guide and don’t be shy to mention things I might have forgotten.
If there are questions, feel free to ask.
VICTORY!!! 🎉 🎉 🎉
Julian. Julian. JULIAN!!!
WE DID IT!!! @JulianGerhard21 !!! THIS IS HUGE!!!
All I did was the following:
And now the bot WORKS!!! I haven’t tested out all the functionality to see if everything is working completely, but it finished training on the RPi completely using spaCy and all the other packages.
Creating Your Own RasaPi - Instructions
@JulianGerhard21 and all others interested in getting RASA on an RPi4, I meticulously created a script that will automatically install everything needed onto your Pi based on the aforementioned exchange:
install.sh
sudo chmod +x install.sh
./install.sh
Please note that installation will take a very long time (~3 hours or so). Grab a tea, go for a run, read a book and come back later!THANK YOU!
I would certainly like to thank @JulianGerhard21 for all the fantastic assistance, input, and massively heavy lifting. Without Julian’s input, none of this would be possible. I have had a wonderful time working together here and learned a lot from you and this process - a “thank you” cannot do you enough justice but… THANK YOU
I would also like to thank @jrosebr for his awesome instructions that I adapted here for installing OpenCV.
Finally, a huge thank you to the RASA team! Thank you for making this wonderful product and I am excited to see how we can all use it on resource-constrained devices!
And with that, I shall now, close the issue. Issue: RESOLVED!
EDIT 10/24/19: Fixed a path error.