Closed TheCedarPrince closed 5 years ago
Hi @TheCedarPrince ,
thanks for your detailed description. However, I'm afraid we can't really do anything to help you with this problem. I know that @JulianGerhard21 managed to run it on a Raspberry PI, maybe he can help us out?
Hi,
indeed Rasa works properly on my Raspi 3 and 4 (Debian 9 and 10). However, I have not updated to 1.3.9 - I will do that tomorrow and give you some Feedback on it. I can for now say that I have built most of the main-dependencies like tf from source because these times compatibility is a Mess.
Sorry that I cant tell you more maybe I can tomorrow.
Regards Julian
Hi @sara-tagger, @wochinge, and @JulianGerhard21.
First off, thanks all for the assistance and thoughts! @wochinge, I am glad you found the bug sufficiently documented - I'll keep it in that format for the future if I find more bugs!
@JulianGerhard21, interesting! I had no problem installing TF actually through a normal pip installation. It was just the or-tools that was giving me issues. If you can provide me the steps you took, I could try to replicate them on my end and do a write-up for your guys' wiki on how to install rasa on the Raspberry Pi 4. I can confirm that I was able to install and successfully run rasa-nlu on the Pi via the following steps:
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 system packages:
sudo apt-get install libatlas-base-dev python3-dev python3-pip libhdf5-dev python-pip python-dev -y
Reboot the computer using sudo reboot
Install rasa-nlu using pip3 install rasa-nlu[spacy]
(NOTE: This step takes a while as it is installing Spacy)
Install spacy's models*
python3 -m spacy link en_core_web_md en
python3 -m spacy download en_core_web_md
(NOTE: The model above is an
English multi-task CNN trained on OntoNotes, with GloVe vectors trained on Common Crawl. Assigns word vectors, context-specific token vectors, POS tags, dependency parse and named entities.
spacy has more information)
Clone the Automaton repo onto the RPi and navigate to the rasa directory:
git clone git@github.com:TheCedarPrince/automaton.git &&
cd automaton/rasa
Train the rasa-nlu model using make train-nlu
Start the rasa-nlu server using make run-nlu
Test by sending a local POST request to the server:
curl XPOST localhost:5000/parse -d '{"query":"Hello", "project": "current"}'
You should receive a json return listing the intents and their intent_ranking scheme (NOTE: You may receive an error saying something like curl: (6) Could not resolve host: XPOST
- don't worry about this for now but continue to send a few additional queries to the server; it will take a moment to start working. Still trying to determine how to resolve this issue!)
Here is an example of what it looked like when I got everything running successfully:
But definitely agree, compatability is a mess; this was why I was trying to build it inside a conda environment (still seeing if that is a possibility as the architecture of conda may not allow us to sufficiently run rasa from a conda environment).
Hi @TheCedarPrince ,
I updated Rasa on my Raspi 4 with Debian 10 to version 1.3.9 "including" ortools. To achieve that, follow these steps:
I think the more heavy thing is to install Spacy on the Pi :-)
I hope that helped!
Regards Julian
Hey @JulianGerhard21,
Thanks for the help! I shall attempt this sometime soon so - then, per your input, we can close the issue provided I can replicate everything. Which I think I will be able to!
With regards to spacy, I actually determined an easier way of doing that by using these steps:
Install system packages:
sudo apt-get install libatlas-base-dev python3-dev python3-pip libhdf5-dev python-pip python-dev -y
Reboot the computer using sudo reboot
Install rasa-nlu using pip3 install rasa-nlu[spacy]
Install spacy's models*
python3 -m spacy link en_core_web_md en
python3 -m spacy download en_core_web_md
Using the python3-dev and python3-pip dependencies, it finds the latest Tensorflow ARM compatible Python wheel.
@JulianGerhard21 Thanks for your fast and competent help! I have seen the question regarding running rasa
on a raspberry PI a couple of times in the forum as well. Would you be up for writing a blog post with instructions? We could feature that in the community newsletter / forum / social media and so on, to give it visibility in the whole community.
Hi @wochinge ,
of course, I would be happy to do that. I am not quite sure if you are in the community@rasa.com dispatcher but Emma already asked the same about my SmartSpeaker project on the Raspi. Is there any template for a tutorial / blog entry that I should respect?
I should add that I won't be able to start this week but next week - is that okay?
Regards Julian
Hey @JulianGerhard21, I can partially confirm your solution that you offered earlier.
Following your instructions for installing mesh, I am now past the or-tools issue! :tada: :tada: :tada:
However, I am still having issues with spaCy. As it would turn out, I was installing a very old version of spaCy onto my Raspberry Pi 4 using pip install rasa-nlu[spacy]
. So this did work, but I am not up to date with all my systems.
I attempted the instructions you left on installing spaCy and was not able to replicate your solution for installing spaCy; could you enumerate the steps you took and how you accomplished this? I tested installing the package with Python 3.5 and 3.7 as well as inside of package management environments (i.e. conda and venv).
What I continue to get stuck on specifically is installing the blis package for spaCy - I tried out the instructions you suggested from here (see reference below) but no luck. I felt the instructions given in the issue you referenced were too vague for me to understand...
Here was the procedure I followed:
git clone -b v2.1.8 https://github.com/explosion/spaCy.git
cd spaCy && rm requirements && wget https://raw.githubusercontent.com/explosion/spaCy/master/requirements.txt
BLIS_ARCH=generic
export PYTHONPATH=
pwd``pip --user install -r requirements.txt
python setup.py build_ext --inplace
pip install --user .
However, I continue getting stuck at installing blis
on step 5. Any thoughts?
Thanks for the assistance @JulianGerhard21!
Hi @TheCedarPrince ,
thanks for your feedback. Unfortunately I am a bit busy today. I have cloned my SDCard and tomorrow I am going to reinstall Rasa 1.3.9 alongside with tensorflow 1.14.0 and Spacy with its newest version and document the whole process.
A keypoint is the fact that the most compatible python version at the moment is 3.6.8 which is not installed per default on Debian 10. After reinstalling that, several other issues did not happen again.
I am going to give you the documentation and feedback, but please dont expect until tomorrow evening. I want to make sure that it's done properly.
Another thing: removing a dependency from a library is not a neat solution so I'd suggest to rename the issue again: "Issues while installing Rasa on a Raspberry Pi4". This would lead more users with partially different/same problems to the issue.
@wochinge I am getting back to you as soon as I have verified, that everything works properly. Maybe you can release the documentation on the docs then until the tutorial is finished. I think a tutorial is more or less a clean guide for different experienced users whereas the docs might address technical facts directly. What do you guys think?
Regards
@JulianGerhard21
of course, I would be happy to do that. I am not quite sure if you are in the community@rasa.com dispatcher
Good question 😄I saw your video of the smart speaker project because it was shared internally and that was so cool!
but Emma already asked the same about my SmartSpeaker project on the Raspi. Is there any template for a tutorial / blog entry that I should respect?
I sent Emma a link to our conversation here, so she can get in touch with you. Not sure, how much sense it makes to combine both blog posts, I guess this would be up to you. Also, there is no template you have to respect.
I should add that I won't be able to start this week but next
Sorry, I didn't mean to rush you. Just the fact that you consider doing that at all is so great!
Maybe you can release the documentation on the docs then until the tutorial is finished.
Pulling in @akelad for that one. Do you want to put that on the docs?
@JulianGerhard21 - oh! I'll test things out with Python3.6.
Oh no rush at all! I just appreciate the help so far.
I agree with you on renaming the issue but I feel the name may be somewhat vague and may attract off-base requests. Since we already solved the or-tools problem, perhaps we could close this issue and open a more general post on the forum? What do you think @JulianGerhard21 and @wochinge?
Also, if you are strapped for time @JulianGerhard21, I could potentially help with the tutorial/docs you want to put together - I have been cataloging my progress anyhow and I could port it over to a tutorial somewhat quickly.
Hi guys,
this is one adventure.... I am nearly finished with a stable Installation guide. Last step is to compile python 3.6.8 with bz2 Support. I will give you feedback / the guide as soon as I finished that step.
Some of the major problems are the dependencies of tensor2tensor which mostly are not arm7 compatible per default and the fact that tensorflow currently has problems with python 3.7.x.
The good news: I managed to install tensorflow, rasa and spacy All with their latest versions (tf 1.14. And 2) without errors by following my documentation.
However, rasa uses bzip2 to handle some file IO operations and I used a python version without it. I am going to confirm everything asap and provide the tutorial.
We can then discuss how to publish it @wochinge @thecedarprince
Regards Julian
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 install python 3.6.8
in several steps. Note that bz2
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:
tar -xvf Python-3.6.8.tar.xz
cd Python-3.6.8.tar.xz
sudo ./configure
sudo make -j4
sudo make install
To confirm that your installation works, you can do:
python3.6 -V
python3.6 -m pip -V
python3.6 -m pip install --upgrade pip --user
and python3.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. use pretrained_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 :D 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.
this is one adventure.... I am nearly finished with a stable Installation guide. Last step is to compile python 3.6.8 with bz2 Support.
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 :D
This is a fantastic write-up @JulianGerhard21 ! I will work on this over the next couple days to see if I can replicate things (am a bit busy right now but should have time to get things all set by Wednesday). Much thanks to you (and your wife!) for all the hard work; in short:
When I get time, I will let you know how things go!
One small note that is fantastic - I originally used Python 3.5 to avoid the OpenCV issue. You were able to work around it in Python3.6 which is awesome. The more recent the version, the better in my opinion!
Hi @TheCedarPrince,
thanks for your kind words. With every iteration we can make the guide more stable! Most likely you will have questions! :)
Let me know whenever I can be of help!
Regards Julian
Ok, here is where I got to for tonight @JulianGerhard21,
I am currently stuck on Step 3. In Step 2 I was not able to run the command tar xJF Python-3.6.8.tar.xz
as it kept giving this error:
pi@raspberrypi:~ $ tar xJF Python-3.6.8.tar.xz
tar: Cannot use multi-volume compressed archives
Try 'tar --help' or 'tar --usage' for more information.
I proceeded on and instead used tar -xvf Python-3.6.8.tar.xz
.
Once I got to Step 3, I ran the command python3.6 -m pip install --upgrade pip
and got the following traceback:
pi@raspberrypi:~ $ sudo python3.6 -m pip install --upgrade pip
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
Could not fetch URL https://www.piwheels.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='www.piwheels.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
Requirement already up-to-date: pip in /usr/local/lib/python3.6/site-packages (18.1)
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
Could not fetch URL https://www.piwheels.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='www.piwheels.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
Any thoughts about what you think is going on? This was after a clean install of Raspbian (Buster) Lite after having only ran the commands:
sudo apt-get update &&
sudo apt-get upgrade -y &&
sudo apt-get dist-upgrade -y
Hi @TheCedarPrince ,
please do:
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
and then repeat step 2.3 and build/configure/make/install
Python again. I think the libssl
was missing. If you can confirm that it works, I will update the guide accordingly.
Regards Julian
@JulianGerhard21 - that worked!
I would suggest editing the guide on Step 2 to this:
2. Install the system dependencies with sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
Also, I like to keep my installs as light as possible and was curious, do we need all the other system dependencies aside from libbz2-dev and libssl-dev? Or can we get away with simply, sudo apt-get install libbz2-dev libssl-dev
?
Finally, in step 3 I do get an error if I run the pip install without the --user flag. I would suggest editing the guide on Step 3 to this:
3. Update pip and setuptools with python3.6 -m pip install --user --upgrade pip
and python3.6 -m pip install --user --upgrade setuptools
(necessary to be able to install the latest wheels/libs)
Will test out the rest of the steps later and keep you up to date.
Yours, TheCedarPrince
Hi @TheCedarPrince ,
Or can we get away with simply, sudo apt-get install libbz2-dev libssl-dev?
this depends mainly on what you want to be able to do later - because of that it was not part of the guide. I myself need most of those packages, but you are right: the minimal requirement are those two. I changed the guide accordingly.
Finally, in step 3 I do get an error if I run the pip install without the --user flag. I would suggest editing the guide on Step 3 to this:
Jeah - this might be a bit annoying but I think to keep things clean, it makes sense. I changed the guide accordingly.
Regards Julian
Hey @JulianGerhard21,
Doing a small update/check-in right now that I want your opinion on. I will provide more info later but am running into an error on Step 16. Once I follow your instructions up to that point, I am still getting errors about the program shouting about opencv
as well as dopamine-rl
.
I removed opencv from the setup.py file in tensor2tensor; when that didn't work, I also tried removing dopamine-rl from the file. No luck either way.
Here is the traceback I am getting with only opencv removed from the file.
pi@raspberrypi:~/tensor2tensor $ python3.6 -m pip install . --user --force-reinstall
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /home/pi/tensor2tensor
Collecting bz2file
Using cached https://www.piwheels.org/simple/bz2file/bz2file-0.98-py3-none-any.whl
Collecting dopamine-rl
Using cached https://www.piwheels.org/simple/dopamine-rl/dopamine_rl-2.0.5-py3-none-any.whl
Collecting flask
Using cached https://files.pythonhosted.org/packages/9b/93/628509b8d5dc749656a9641f4caf13540e2cdec85276964ff8f43bbb1d3b/Flask-1.1.1-py2.py3-none-any.whl
Collecting future
Using cached https://www.piwheels.org/simple/future/future-0.18.1-py3-none-any.whl
Processing /home/pi/.cache/pip/wheels/35/a6/a0/c8441dbd28276aaff148c417279dee46f84936ba108cf32208/gevent-1.4.0-cp36-cp36m-linux_armv7l.whl
Collecting gin-config
Using cached https://www.piwheels.org/simple/gin-config/gin_config-0.2.1-py3-none-any.whl
Collecting google-api-python-client
Using cached https://www.piwheels.org/simple/google-api-python-client/google_api_python_client-1.7.11-py3-none-any.whl
Collecting gunicorn
Using cached https://files.pythonhosted.org/packages/8c/da/b8dd8deb741bff556db53902d4706774c8e1e67265f69528c14c003644e6/gunicorn-19.9.0-py2.py3-none-any.whl
Collecting gym
Using cached https://www.piwheels.org/simple/gym/gym-0.15.3-py3-none-any.whl
Processing /home/pi/.cache/pip/wheels/bd/4f/8e/a608fe814bb1b784ca1680e7fac3cc16b4e071a46275997e69/h5py-2.10.0-cp36-cp36m-linux_armv7l.whl
Collecting kfac
Using cached https://files.pythonhosted.org/packages/01/f0/4a7758f854a15b37d322827123ce58619d0f4270dd94f2dd30328f397339/kfac-0.2.0-py2.py3-none-any.whl
Collecting mesh-tensorflow
Using cached https://files.pythonhosted.org/packages/42/10/7bbf9f19bbd57693b7cd66358ad432ea358e2af24d0f444ec6abf6385f49/mesh_tensorflow-0.1.4-py2.py3-none-any.whl
Processing /home/pi/.cache/pip/wheels/5e/e9/4b/dd5a8eb53e97dfcc1314eca9c6769edd3cad379d6644c1ad94/numpy-1.17.3-cp36-cp36m-linux_armv7l.whl
Collecting oauth2client
Using cached https://files.pythonhosted.org/packages/95/a9/4f25a14d23f0786b64875b91784607c2277eff25d48f915e39ff0cff505a/oauth2client-4.1.3-py2.py3-none-any.whl
Processing /home/pi/.cache/pip/wheels/ad/d5/3d/65149b7a670d61cfe9636b75c1dcc94eb49bb33412b260f328/Pillow-6.2.1-cp36-cp36m-linux_armv7l.whl
Collecting pypng
Using cached https://www.piwheels.org/simple/pypng/pypng-0.0.20-py3-none-any.whl
Collecting requests
Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
Processing /home/pi/.cache/pip/wheels/4f/02/c1/598fa696113cc7be343f4da8ff69ed02e86ebf13ce420f2f20/scipy-1.3.1-cp36-cp36m-linux_armv7l.whl
Collecting six
Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting sympy
Using cached https://files.pythonhosted.org/packages/21/21/f4105795ca7f35c541d82c5b06be684dd2f5cb4f508fb487cd7aea4de776/sympy-1.4-py2.py3-none-any.whl
Collecting tensorflow-datasets
Using cached https://files.pythonhosted.org/packages/e2/14/900746f9b8e1ed8ea93661f1a62b3937a5a25858d550ece38de8ea579f2d/tensorflow_datasets-1.3.0-py3-none-any.whl
Collecting tensorflow-gan
Using cached https://files.pythonhosted.org/packages/3e/94/8903150ffafdd538b18e6d24dbd4f5a07105d9d31a29db49e728ae2a8b13/tensorflow_gan-1.0.0.dev0-py2.py3-none-any.whl
Collecting tensorflow-probability==0.7.0
Using cached https://files.pythonhosted.org/packages/3e/3a/c10b6c22320531c774402ac7186d1b673374e2a9d12502cbc8d811e4601c/tensorflow_probability-0.7.0-py2.py3-none-any.whl
Collecting tqdm
Using cached https://files.pythonhosted.org/packages/e1/c1/bc1dba38b48f4ae3c4428aea669c5e27bd5a7642a74c8348451e0bd8ff86/tqdm-4.36.1-py2.py3-none-any.whl
ERROR: Could not find a version that satisfies the requirement opencv-python>=3.4.1.15 (from dopamine-rl->tensor2tensor==1.14.1) (from versions: none)
ERROR: No matching distribution found for opencv-python>=3.4.1.15 (from dopamine-rl->tensor2tensor==1.14.1)
Here is also the output of my pip list (I do have OpenCV installed and can successfully import it - just don't know why cv2 is not popping up in my pip list):
Package Version
------------------------ ----------
absl-py 0.8.1
astor 0.8.0
atomicwrites 1.3.0
attrs 19.3.0
blis 0.4.1
bz2file 0.98
cachetools 3.1.1
certifi 2019.9.11
chardet 3.0.4
Click 7.0
cloudpickle 1.2.2
cymem 2.0.2
Cython 0.29.13
decorator 4.4.0
dill 0.3.1.1
dopamine-rl 2.0.5
flake8 3.5.0
Flask 1.1.1
future 0.18.1
gast 0.3.2
gevent 1.4.0
gin-config 0.2.1
google-api-python-client 1.7.11
google-auth 1.6.3
google-auth-httplib2 0.0.3
google-pasta 0.1.7
googleapis-common-protos 1.6.0
greenlet 0.4.15
grpcio 1.24.1
gunicorn 19.9.0
gym 0.15.3
h5py 2.10.0
httplib2 0.14.0
idna 2.8
importlib-metadata 0.23
itsdangerous 1.1.0
Jinja2 2.10.3
jsonschema 3.0.2
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.0
kfac 0.2.0
Markdown 3.1.1
MarkupSafe 1.1.1
mccabe 0.6.1
mesh-tensorflow 0.1.4
mock 2.0.0
more-itertools 7.2.0
mpmath 1.1.0
murmurhash 1.0.2
numpy 1.17.3
oauth2client 4.1.3
packaging 19.2
pbr 5.4.3
Pillow 6.2.1
pip 19.3.1
plac 1.1.0
pluggy 0.13.0
preshed 3.0.2
promise 2.2.1
protobuf 3.10.0
psycopg2 2.8.4
py 1.8.0
pyasn1 0.4.7
pyasn1-modules 0.2.7
pycodestyle 2.3.1
pyflakes 1.6.0
pyglet 1.3.2
pyparsing 2.4.2
pypng 0.0.20
pyrsistent 0.15.4
pytest 5.2.1
pytest-timeout 1.3.3
requests 2.22.0
rsa 4.0
scipy 1.3.1
setuptools 41.4.0
six 1.12.0
spacy 2.2.1
srsly 0.1.0
sympy 1.4
tensorboard 1.14.0
tensorflow 1.14.0
tensorflow-datasets 1.3.0
tensorflow-estimator 1.14.0
tensorflow-gan 1.0.0.dev0
tensorflow-metadata 0.15.0
tensorflow-probability 0.7.0
termcolor 1.1.0
thinc 7.2.0
tqdm 4.36.1
uritemplate 3.0.0
urllib3 1.25.6
wasabi 0.2.2
wcwidth 0.1.7
Werkzeug 0.16.0
wheel 0.33.6
wrapt 1.11.2
zipp 0.6.0
Any thoughts on what is going on? I may try a fresh install to see if that works. If you need more information, let me know.
Yours, TheCedarPrince
Hi @TheCedarPrince,
are you sure that you haven't accidently skipped this part:
python3.6 -m pip install dopamine-rl --user --no-deps
(steps 10 and 11) ?
I'd suggest to repeat those steps first: 10 - 12
and 15
, after that, you should be able to do 16
.
Keep the following in mind:
If you install something via pip, pip checks the dependencies of the package and those dependencies normally have their own dependencies. If you have modified a third-party library to be able to install
something, this modification is only used if installed manually with the . - path
. If it gets fetched from a remote pip index, your modifications won't work - this is actually what happens in step 16.
Regarding cv2: As I mentioned, there is no information-deployment in the site-packages (where pip show reads from) for cv2 because this step is missing in the OpenCV guide. It is something on my agenda that I have to experiment on - should not be that hard.
I hope it works now!
Regards Julian
Hey @JulianGerhard21,
I am so so close!
I can boot up RASA, it pops me into the prompt, and when it starts to do its magic, it fails with the following traceback:
Welcome to Rasa! 🤖
To get started quickly, an initial project will be created.
If you need some help, check out the documentation at https://rasa.com/docs/rasa.
Now let's start! 👇🏽
? Please enter a path where the project will be created [default: current directory] .
Created project directory at '/home/src'.
Finished creating project structure.
Training an initial model...
Training Core model...
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.6/site-packages/rasa/core/registry.py", line 21, in policy_from_module_path
module_path, lookup_path="rasa.core.policies.registry"
File "/home/pi/.local/lib/python3.6/site-packages/rasa/utils/common.py", line 184, in class_from_module_path
m = importlib.import_module(lookup_path)
File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/pi/.local/lib/python3.6/site-packages/rasa/core/policies/registry.py", line 5, in <module>
from rasa.core.policies.embedding_policy import EmbeddingPolicy
File "/home/pi/.local/lib/python3.6/site-packages/rasa/core/policies/embedding_policy.py", line 24, in <module>
from rasa.utils import train_utils
File "/home/pi/.local/lib/python3.6/site-packages/rasa/utils/train_utils.py", line 9, in <module>
from tensor2tensor.models.transformer import (
ModuleNotFoundError: No module named 'tensor2tensor'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.6/site-packages/rasa/core/policies/ensemble.py", line 320, in from_dict
constr_func = registry.policy_from_module_path(policy_name)
File "/home/pi/.local/lib/python3.6/site-packages/rasa/core/registry.py", line 24, in policy_from_module_path
raise ImportError("Cannot retrieve policy from path '{}'".format(module_path))
ImportError: Cannot retrieve policy from path 'MemoizationPolicy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/pi/.local/lib/python3.6/site-packages/rasa/__main__.py", line 87, in <module>
main()
File "/home/pi/.local/lib/python3.6/site-packages/rasa/__main__.py", line 76, in main
cmdline_arguments.func(cmdline_arguments)
File "/home/pi/.local/lib/python3.6/site-packages/rasa/cli/scaffold.py", line 195, in run
init_project(args, path)
File "/home/pi/.local/lib/python3.6/site-packages/rasa/cli/scaffold.py", line 113, in init_project
print_train_or_instructions(args, path)
File "/home/pi/.local/lib/python3.6/site-packages/rasa/cli/scaffold.py", line 50, in print_train_or_instructions
args.model = rasa.train(domain, config, training_files, output)
File "/home/pi/.local/lib/python3.6/site-packages/rasa/train.py", line 45, in train
kwargs=kwargs,
File "uvloop/loop.pyx", line 1417, in uvloop.loop.Loop.run_until_complete
File "/home/pi/.local/lib/python3.6/site-packages/rasa/train.py", line 96, in train_async
kwargs,
File "/home/pi/.local/lib/python3.6/site-packages/rasa/train.py", line 182, in _train_async_internal
kwargs=kwargs,
File "/home/pi/.local/lib/python3.6/site-packages/rasa/train.py", line 217, in _do_training
kwargs=kwargs,
File "/home/pi/.local/lib/python3.6/site-packages/rasa/train.py", line 346, in _train_core_with_validated_data
kwargs=kwargs,
File "/home/pi/.local/lib/python3.6/site-packages/rasa/core/train.py", line 43, in train
policies = config.load(policy_config)
File "/home/pi/.local/lib/python3.6/site-packages/rasa/core/config.py", line 28, in load
return PolicyEnsemble.from_dict(config_data)
File "/home/pi/.local/lib/python3.6/site-packages/rasa/core/policies/ensemble.py", line 328, in from_dict
"".format(policy_name)
rasa.core.policies.ensemble.InvalidPolicyConfig: Module for policy 'MemoizationPolicy' could not be loaded. Please make sure the name is a valid policy.
I am definitely executing through Steps 10 - 12 to install tensor2tensor
but for some reason it keeps failing. Here is exactly what I am doing:
cd tensor2tensor
python3.6 -m pip install dopamine-rl --user --no-deps
sed -i '/opencv-python/d' setup.py
python3.6 -m pip install . --user --force-reinstall
And here is the following traceback I am getting from that:
pi@raspberrypi:~/tensor2tensor $ python3.6 -m pip install . --user --force-reinstall
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /home/pi/tensor2tensor
Collecting bz2file
Using cached https://www.piwheels.org/simple/bz2file/bz2file-0.98-py3-none-any.whl
Collecting dopamine-rl
Using cached https://www.piwheels.org/simple/dopamine-rl/dopamine_rl-2.0.5-py3-none-any.whl
Collecting flask
Using cached https://files.pythonhosted.org/packages/9b/93/628509b8d5dc749656a9641f4caf13540e2cdec85276964ff8f43bbb1d3b/Flask-1.1.1-py2.py3-none-any.whl
Collecting future
Using cached https://www.piwheels.org/simple/future/future-0.18.1-py3-none-any.whl
Processing /home/pi/.cache/pip/wheels/35/a6/a0/c8441dbd28276aaff148c417279dee46f84936ba108cf32208/gevent-1.4.0-cp36-cp36m-linux_armv7l.whl
Collecting gin-config
Using cached https://www.piwheels.org/simple/gin-config/gin_config-0.2.1-py3-none-any.whl
Collecting google-api-python-client
Using cached https://www.piwheels.org/simple/google-api-python-client/google_api_python_client-1.7.11-py3-none-any.whl
Collecting gunicorn
Using cached https://files.pythonhosted.org/packages/8c/da/b8dd8deb741bff556db53902d4706774c8e1e67265f69528c14c003644e6/gunicorn-19.9.0-py2.py3-none-any.whl
Collecting gym
Using cached https://www.piwheels.org/simple/gym/gym-0.15.3-py3-none-any.whl
Processing /home/pi/.cache/pip/wheels/bd/4f/8e/a608fe814bb1b784ca1680e7fac3cc16b4e071a46275997e69/h5py-2.10.0-cp36-cp36m-linux_armv7l.whl
Collecting kfac
Using cached https://files.pythonhosted.org/packages/01/f0/4a7758f854a15b37d322827123ce58619d0f4270dd94f2dd30328f397339/kfac-0.2.0-py2.py3-none-any.whl
Collecting mesh-tensorflow
Using cached https://files.pythonhosted.org/packages/42/10/7bbf9f19bbd57693b7cd66358ad432ea358e2af24d0f444ec6abf6385f49/mesh_tensorflow-0.1.4-py2.py3-none-any.whl
Processing /home/pi/.cache/pip/wheels/5e/e9/4b/dd5a8eb53e97dfcc1314eca9c6769edd3cad379d6644c1ad94/numpy-1.17.3-cp36-cp36m-linux_armv7l.whl
Collecting oauth2client
Using cached https://files.pythonhosted.org/packages/95/a9/4f25a14d23f0786b64875b91784607c2277eff25d48f915e39ff0cff505a/oauth2client-4.1.3-py2.py3-none-any.whl
Collecting Pillow
Using cached https://files.pythonhosted.org/packages/5b/bb/cdc8086db1f15d0664dd22a62c69613cdc00f1dd430b5b19df1bea83f2a3/Pillow-6.2.1.tar.gz
Collecting pypng
Using cached https://www.piwheels.org/simple/pypng/pypng-0.0.20-py3-none-any.whl
Collecting requests
Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
Processing /home/pi/.cache/pip/wheels/4f/02/c1/598fa696113cc7be343f4da8ff69ed02e86ebf13ce420f2f20/scipy-1.3.1-cp36-cp36m-linux_armv7l.whl
Collecting six
Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting sympy
Using cached https://files.pythonhosted.org/packages/21/21/f4105795ca7f35c541d82c5b06be684dd2f5cb4f508fb487cd7aea4de776/sympy-1.4-py2.py3-none-any.whl
Collecting tensorflow-datasets
Using cached https://files.pythonhosted.org/packages/e2/14/900746f9b8e1ed8ea93661f1a62b3937a5a25858d550ece38de8ea579f2d/tensorflow_datasets-1.3.0-py3-none-any.whl
Collecting tensorflow-gan
Using cached https://files.pythonhosted.org/packages/3e/94/8903150ffafdd538b18e6d24dbd4f5a07105d9d31a29db49e728ae2a8b13/tensorflow_gan-1.0.0.dev0-py2.py3-none-any.whl
Collecting tensorflow-probability==0.7.0
Using cached https://files.pythonhosted.org/packages/3e/3a/c10b6c22320531c774402ac7186d1b673374e2a9d12502cbc8d811e4601c/tensorflow_probability-0.7.0-py2.py3-none-any.whl
Collecting tqdm
Using cached https://files.pythonhosted.org/packages/e1/c1/bc1dba38b48f4ae3c4428aea669c5e27bd5a7642a74c8348451e0bd8ff86/tqdm-4.36.1-py2.py3-none-any.whl
Collecting absl-py>=0.2.2
Using cached https://www.piwheels.org/simple/absl-py/absl_py-0.8.1-py3-none-any.whl
ERROR: Could not find a version that satisfies the requirement opencv-python>=3.4.1.15 (from dopamine-rl->tensor2tensor==1.14.1) (from versions: none)
ERROR: No matching distribution found for opencv-python>=3.4.1.15 (from dopamine-rl->tensor2tensor==1.14.1)
Also, here is the traceback for when I run the command for dopamine-rl
after I had initially removed it - am I installing the correct version?:
pi@raspberrypi:~/tensor2tensor $ python3.6 -m pip install dopamine-rl --user --no-deps
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting dopamine-rl
Using cached https://www.piwheels.org/simple/dopamine-rl/dopamine_rl-2.0.5-py3-none-any.whl
Installing collected packages: dopamine-rl
Successfully installed dopamine-rl-2.0.5
We are almost there I think! Any thoughts as to what you think is happening?
EDIT: Wait, I might have found the mistake. Hang on. EDIT 2: Nope. False alarm. Still Stuck.
Yours, TheCedarPrince
@JulianGerhard21 ,
Ok, I tried tracking down my bug but still could not find it. Any thoughts?
Yours, TheCedarPrince
Hi @TheCedarPrince,
ok - let's try something:
Do a pip show dopamine-rl
and if version 2.0.5
is shown (which is the correct one),
move into tensor2tensor
directory and use python3.6 -m pip install . --user
without the --force-reinstall
. This should prevent pip from digging too deep into the dependencies tree.
The error shown by rasa is "only" a consecutive error produced by the broken tensor2tensor libraby.
Did that work?
Regards Julian
@JulianGerhard21 ,
I tried it again and still no luck; here is the return on python3.6 -m pip show dopamine-rl
:
Name: dopamine-rl
Version: 2.0.5
Summary: Dopamine: A framework for flexible Reinforcement Learning research
Home-page: https://github.com/google/dopamine
Author: The Dopamine Team
Author-email: UNKNOWN
License: Apache 2.0
Location: /home/pi/.local/lib/python3.6/site-packages
Requires: opencv-python, gym, absl-py, gin-config
Required-by:
And here is the output from when I execute python3.6 -m pip install . --user
:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /home/pi/tensor2tensor
Collecting bz2file
Using cached https://www.piwheels.org/simple/bz2file/bz2file-0.98-py3-none-any.whl
Requirement already satisfied: dopamine-rl in /home/pi/.local/lib/python3.6/site-packages (from tensor2tensor==1.14.1) (2.0.5)
Requirement already satisfied: flask in /home/pi/.local/lib/python3.6/site-packages (from tensor2tensor==1.14.1) (1.1.1)
Requirement already satisfied: future in /home/pi/.local/lib/python3.6/site-packages (from tensor2tensor==1.14.1) (0.18.1)
Requirement already satisfied: gevent in /home/pi/.local/lib/python3.6/site-packages (from tensor2tensor==1.14.1) (1.4.0)
Collecting gin-config
Using cached https://www.piwheels.org/simple/gin-config/gin_config-0.2.1-py3-none-any.whl
Collecting google-api-python-client
Using cached https://www.piwheels.org/simple/google-api-python-client/google_api_python_client-1.7.11-py3-none-any.whl
Collecting gunicorn
Using cached https://files.pythonhosted.org/packages/8c/da/b8dd8deb741bff556db53902d4706774c8e1e67265f69528c14c003644e6/gunicorn-19.9.0-py2.py3-none-any.whl
Collecting gym
Using cached https://www.piwheels.org/simple/gym/gym-0.15.3-py3-none-any.whl
Requirement already satisfied: h5py in /home/pi/.local/lib/python3.6/site-packages (from tensor2tensor==1.14.1) (2.10.0)
Collecting kfac
Using cached https://files.pythonhosted.org/packages/01/f0/4a7758f854a15b37d322827123ce58619d0f4270dd94f2dd30328f397339/kfac-0.2.0-py2.py3-none-any.whl
Collecting mesh-tensorflow
Using cached https://files.pythonhosted.org/packages/42/10/7bbf9f19bbd57693b7cd66358ad432ea358e2af24d0f444ec6abf6385f49/mesh_tensorflow-0.1.4-py2.py3-none-any.whl
Requirement already satisfied: numpy in /home/pi/.local/lib/python3.6/site-packages (from tensor2tensor==1.14.1) (1.17.3)
Collecting oauth2client
Using cached https://files.pythonhosted.org/packages/95/a9/4f25a14d23f0786b64875b91784607c2277eff25d48f915e39ff0cff505a/oauth2client-4.1.3-py2.py3-none-any.whl
Collecting Pillow
Using cached https://files.pythonhosted.org/packages/5b/bb/cdc8086db1f15d0664dd22a62c69613cdc00f1dd430b5b19df1bea83f2a3/Pillow-6.2.1.tar.gz
Collecting pypng
Using cached https://www.piwheels.org/simple/pypng/pypng-0.0.20-py3-none-any.whl
Requirement already satisfied: requests in /home/pi/.local/lib/python3.6/site-packages (from tensor2tensor==1.14.1) (2.22.0)
Requirement already satisfied: scipy in /home/pi/.local/lib/python3.6/site-packages (from tensor2tensor==1.14.1) (1.3.1)
Requirement already satisfied: six in /home/pi/.local/lib/python3.6/site-packages (from tensor2tensor==1.14.1) (1.12.0)
Collecting sympy
Using cached https://files.pythonhosted.org/packages/21/21/f4105795ca7f35c541d82c5b06be684dd2f5cb4f508fb487cd7aea4de776/sympy-1.4-py2.py3-none-any.whl
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/tensorflow-datasets/
Collecting tensorflow-datasets
Using cached https://files.pythonhosted.org/packages/e2/14/900746f9b8e1ed8ea93661f1a62b3937a5a25858d550ece38de8ea579f2d/tensorflow_datasets-1.3.0-py3-none-any.whl
Collecting tensorflow-gan
Using cached https://files.pythonhosted.org/packages/3e/94/8903150ffafdd538b18e6d24dbd4f5a07105d9d31a29db49e728ae2a8b13/tensorflow_gan-1.0.0.dev0-py2.py3-none-any.whl
Requirement already satisfied: tensorflow-probability==0.7.0 in /home/pi/.local/lib/python3.6/site-packages (from tensor2tensor==1.14.1) (0.7.0)
Requirement already satisfied: tqdm in /home/pi/.local/lib/python3.6/site-packages (from tensor2tensor==1.14.1) (4.36.1)
ERROR: Could not find a version that satisfies the requirement opencv-python>=3.4.1.15 (from dopamine-rl->tensor2tensor==1.14.1) (from versions: none)
ERROR: No matching distribution found for opencv-python>=3.4.1.15 (from dopamine-rl->tensor2tensor==1.14.1)
I have a theory that I am going to try based on the output from the pip show
of dopamine-rl
. The source code of dopamine in their setup.py file has open-cv as a requirement; I am going to remove that since we already have open-cv installed and attempt to install from source.
Will post results back later. Let me know if you have any other theories. But you never had a problem with dopamine-rl
before when you were installing things on your RPi @JulianGerhard21 ?
Yours,
TheCedarPrince
Hi @TheCedarPrince,
hm - strange. I never had this problem. However we are going to solve it. Try your idea and give feedback - thats good. Another idea would be:
Remove dopamine
from tensor2tensor
's dependencies and install it again. Confirm with pip show tensor2tensor
that it is installed and try Rasa.
Regards Julian
Julian. Julian. JULIAN!!!!
WE DID IT!!! @JulianGerhard21 !!! THIS IS HUGE!!!
All I did was the following:
git clone https://github.com/google/dopamine.git
cd dopamine/
sed -i '/opencv-python/d' setup.py
python3.6 -m pip install . --user
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.
@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
# Update the Raspberry Pi
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
# Install initial build dependencies
# Provides
# Enables pip3.6 to access pypi
sudo apt-get install libbz2-dev libssl-dev -y
# Get and install Python3.6
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz
tar -xvf Python-3.6.8.tar.xz
cd Python-3.6.8
sudo ./configure
sudo make -j4
sudo make install
# Update Python3.6 packages
python3.6 -m pip install --upgrade pip setuptools --user
# Install additional dependencies
# Enables access to Tensorflow whl
# Dependency for the h5py python package
sudo apt-get install python3-pip libhdf5-dev -y
# Install Tensorflow
python3.6 -m pip install tensorflow==1.14.0 --user
# Install OpenCV Dependencies
sudo apt-get install build-essential cmake unzip pkg-config -y
sudo apt-get install libjpeg-dev libpng-dev libtiff-dev -y
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev -y
sudo apt-get install libxvidcore-dev libx264-dev -y
sudo apt-get install libgtk-3-dev -y
sudo apt-get install libcanberra-gtk* -y
sudo apt-get install libatlas-base-dev gfortran -y
sudo apt-get install python3-dev -y
# Download OpenCV and clarify naming scheme
cd ~
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.0.0.zip
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.0.0.zip
unzip opencv.zip
unzip opencv_contrib.zip
mv opencv-4.0.0 opencv
mv opencv_contrib-4.0.0 opencv_contrib
cd ~/opencv
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
-D ENABLE_NEON=ON \
-D ENABLE_VFPV3=ON \
-D BUILD_TESTS=OFF \
-D OPENCV_ENABLE_NONFREE=ON \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D BUILD_EXAMPLES=OFF ..
# Increasing swap size to make OpenCV
SWAPSIZE=2048
sed -i "s/^CONF_SWAPSIZE.*/CONF_SWAPSIZE=${SWAPSIZE}/" /etc/dphys-swapfile
# Restarting swap service
sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start
# Make OpenCV
make -j4
# Install OpenCV
sudo make install
sudo ldconfig
# Reseting swap size
SWAPSIZE=100
sed -i "s/^CONF_SWAPSIZE.*/CONF_SWAPSIZE=${SWAPSIZE}/" /etc/dphys-swapfile
# Restarting swap service
sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start
# Link cv2 to Python3.6
cd /usr/local/lib/python3.6/site-packages/
sudo ln -s /usr/local/python/cv2/python-3.6/cv2.cpython-36m-arm-linux-gnueabihf.so cv2.so
# In case git is not installed
sudo apt-get install git -y
# Getting codebases for spaCy, tensor2tensor, and RASA
# NOTE: This is hard-coded for rasa-1.4.0 right now - let's make it more elegant soon
cd ~
git clone https://github.com/explosion/spaCy
git clone https://github.com/tensorflow/tensor2tensor
git clone https://github.com/google/dopamine.git
wget https://github.com/RasaHQ/rasa/archive/1.4.0.zip && unzip 1.4.0.zip
# Installing spaCy
export BLIS_ARCH=generic
cd ~/spaCy
python3.6 -m pip install -r requirements.txt --user
python3.6 setup.py build_ext --inplace
python3.6 -m pip install . --user
# Installing dopamine-rl
cd ~/dopamine
sed -i '/opencv-python/d' setup.py
python3.6 -m pip install . --user
# Installing tensor2tensor
cd ~/tensor2tensor
sed -i '/opencv-python/d' setup.py
python3.6 -m pip install . --user --force-reinstall
# Installing other RASA dependencies
sudo apt install libpq-dev/buster -y
python3.6 -m pip install psycopg2 --user
# Installing RASA
cd ~/rasa-1.4.0
sed -i '/tensor2tensor/d' setup.py
sed -i '/tensor2tensor/d' requirements.txt
python3.6 -m pip install -r requirements.txt --user --force-reinstall
python3.6 -m pip install . --user --force-reinstall
# Script exit
echo ""
echo ""
echo "------------------------------------------------------------"
echo "Congratulations! Rasa is now installed on your Raspberry Pi."
echo "To test rasa out, run python3.6 -m rasa init and start "
echo "creating your bot!"
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!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.
So, what now @JulianGerhard21 , @wochinge , @akelad ?
I was thinking @wochinge and @akelad , perhaps the RASA team could make a separate, community-supported repo for the Raspberry Pi now that things are working? I could imagine things will become incompatible in the future and it would be a shame to see this support fall away as I think this opens RASA to a whole new community of makers, researchers, etc.
Perhaps we could start the Repo with the aforementioned script that was adapted from @JulianGerhard21 's guide and tweaked by me? Maybe you guys could also host a Pi image with RASA set up on it that we could download from the RASA site?
What do you think @JulianGerhard21 ?
Yours,
TheCedarPrince
Hi @TheCedarPrince ,
glad it worked - thanks for the kind words and thanks for the script - good idea - that makes life much easier.
I am up to everything that makes sense. I confirm that there definitely will be incompatibilites in the future and we need to keep track of them. A feature-branch or own repo needs to be updated/maintained and I am not quite sure if the Rasa team wants to provide that - but of course I would be in.
I think @wochinge and @akelad need to decide how to proceed. I think a tutorial on their blog would be a good start. In addition we could determine if your other suggestions make sense!
However, I am in - of course! :-)
Regards Julian
@JulianGerhard21 @TheCedarPrince awesome that you got it working! it's really great to see the community working together like this :) We will certainly discuss internally how we can best support you with the Raspberry Pi setup and will get back to you
Hey @wochinge , @akelad , @JulianGerhard21 ,
I am reopening this issue as I want to see if the script Julian and I wrote can be independently verified. To test it, here is what you do:
install.sh
:# Update the Raspberry Pi
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
# Install initial build dependencies
# Provides
# Enables pip3.6 to access pypi
sudo apt-get install libbz2-dev libssl-dev -y
# Get and install Python3.6
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz
tar -xvf Python-3.6.8.tar.xz
cd Python-3.6.8
sudo ./configure
sudo make -j4
sudo make install
# Update Python3.6 packages
python3.6 -m pip install --upgrade pip setuptools --user
# Install additional dependencies
# Enables access to Tensorflow whl
# Dependency for the h5py python package
sudo apt-get install python3-pip libhdf5-dev -y
# Install Tensorflow
python3.6 -m pip install tensorflow==1.14.0 --user
# Install OpenCV Dependencies
sudo apt-get install build-essential cmake unzip pkg-config -y
sudo apt-get install libjpeg-dev libpng-dev libtiff-dev -y
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev -y
sudo apt-get install libxvidcore-dev libx264-dev -y
sudo apt-get install libgtk-3-dev -y
sudo apt-get install libcanberra-gtk* -y
sudo apt-get install libatlas-base-dev gfortran -y
# Download OpenCV and clarify naming scheme
cd ~
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.0.0.zip
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.0.0.zip
unzip opencv.zip
unzip opencv_contrib.zip
mv opencv-4.0.0 opencv
mv opencv_contrib-4.0.0 opencv_contrib
cd ~/opencv
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
-D ENABLE_NEON=ON \
-D ENABLE_VFPV3=ON \
-D BUILD_TESTS=OFF \
-D OPENCV_ENABLE_NONFREE=ON \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D BUILD_EXAMPLES=OFF ..
# Increasing swap size to make OpenCV
SWAPSIZE=2048
sudo sed -i "s/^CONF_SWAPSIZE.*/CONF_SWAPSIZE=${SWAPSIZE}/" /etc/dphys-swapfile
# Restarting swap service
sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start
# Make OpenCV
make -j4
# Install OpenCV
sudo make install
sudo ldconfig
# Reseting swap size
SWAPSIZE=100
sudo sed -i "s/^CONF_SWAPSIZE.*/CONF_SWAPSIZE=${SWAPSIZE}/" /etc/dphys-swapfile
# Restarting swap service
sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start
# Link cv2 to Python3.6
cd /usr/local/lib/python3.6/site-packages/
sudo ln -s /usr/local/python/cv2/python-3.6/cv2.cpython-36m-arm-linux-gnueabihf.so cv2.so
# In case git is not installed
sudo apt-get install git -y
# Getting codebases for spaCy, tensor2tensor, and RASA
# NOTE: This is hard-coded for rasa-1.4.0 right now - let's make it more elegant soon
cd ~
git clone https://github.com/explosion/spaCy
git clone https://github.com/tensorflow/tensor2tensor
git clone https://github.com/google/dopamine.git
wget https://github.com/RasaHQ/rasa/archive/1.4.0.zip && unzip 1.4.0.zip
# Installing spaCy
export BLIS_ARCH=generic
cd ~/spaCy
python3.6 -m pip install -r requirements.txt --user
python3.6 setup.py build_ext --inplace
python3.6 -m pip install . --user
# Installing dopamine-rl
cd ~/dopamine
sed -i '/opencv-python/d' setup.py
sed -i '/dopamine-rl/d' setup.py
python3.6 -m pip install . --user
# Installing tensor2tensor
cd ~/tensor2tensor
sed -i '/opencv-python/d' setup.py
python3.6 -m pip install . --user --force-reinstall
# Installing other RASA dependencies
sudo apt install libpq-dev/buster -y
python3.6 -m pip install psycopg2 --user
# Installing RASA
cd ~/rasa-1.4.0
sed -i '/tensor2tensor/d' setup.py
sed -i '/tensor2tensor/d' requirements.txt
python3.6 -m pip install -r requirements.txt --user --force-reinstall
python3.6 -m pip install . --user --force-reinstall
# Script exit
echo ""
echo ""
echo "------------------------------------------------------------"
echo "Congratulations! Rasa is now installed on your Raspberry Pi."
echo "To test rasa out, run python3.6 -m rasa init and start "
echo "creating your bot!"
sudo chmod +x install.sh
./install.sh | tee log.txt
log.txt
here and let me know if you ran into any issues while installingThis process will take upwards of 3 hours so don't worry if it is taking longer than expected. Thanks for the help and looking forward to making sure this script is good to go!
TheCedarPrince
Hi @TheCedarPrince , @JulianGerhard21 ,
our team discussed how we can best add this to Rasa, and we think it would be best if you would set up a separate repository which includes the script and maybe some tests which verify that new releases didn't break things. If you need any help in setting this up, we are happy to support you there. We can then link to it from the docs so that it's visible to the community. How does that sound?
I am reopening this issue as I want to see if the script Julian and I wrote can be independently verified. To test it, here is what you do:
I'm currently trying to find out whether anyone in our engineering part owns a raspberry PI. However, you could also share it in our forum and get some feedback from the community? https://forum.rasa.com/c/rasa/tutorials would be a good place for that 🤔
Hey @wochinge - that sounds good.
Unfortunately, I am going to have to say no about creating the separate repository right now as I do not have the bandwidth to take it on. @JulianGerhard21 - do you?
The forum is a good idea! I will pop over soon and make a post. :smile:
Yours, TheCedarPrince
Hi @wochinge, @TheCedarPrince
Sorry for the late reply. I had some private incidents pro manage. I think this is a good idea/approach and I would be willing to work on this. However this cant be done in a few days IMHO so I need some time to think about the things to prepare.
I would come back to you with feedback asap!
Thanks for the support!
Regards Julian
Hey @wochinge and @JulianGerhard21,
I added the news to the Rasa Forum and am now waiting to hear from the community about the script.
Sounds good @JulianGerhard21 - hope all is well! Chat later.
Yours, TheCedarPrince
@JulianGerhard21 Sure, take all the time you need!
@TheCedarPrince Thanks for creating the post!
@TheCedarPrince thanks for this script. I'd really like to get Rasa working on the Pi. The tensor2tensor
install is failing and I confirmed that opencv-python
has been removed from the setup.py
.
ERROR: Could not find a version that satisfies the requirement opencv-python>=3.4.1.15 (from dopamine-rl->tensor2tensor==1.14.1) (from versions: none)
ERROR: No matching distribution found for opencv-python>=3.4.1.15 (from dopamine-rl->tensor2tensor==1.14.1)
Hey @rgstephens
If it is there, could you try removing dopamine-rl from the setup.py for tensor2tensor as well?
Let me know if that works.
Also, I am closing this issue and encourage everyone who has a question to see this forum and post your questions here.
Thank you! TheCedarPrince
Hi,
I got this problem with the install.sh:
ERROR: Could not find a version that satisfies the requirement tensorflow~
=1.14.0 (from rasa==1.4.0) (from versions: none)
ERROR: No matching distribution found for tensorflow~=1.14.0 (from rasa==1
.4.0)```
Hey @wochinge , @akelad , @JulianGerhard21 ,
I am reopening this issue as I want to see if the script Julian and I wrote can be independently verified. To test it, here is what you do:
- Download the latest version of Raspbian Lite onto a Raspberry Pi 4
- Copy this script onto the Raspberry Pi into
install.sh
:# Update the Raspberry Pi sudo apt-get update sudo apt-get upgrade -y sudo apt-get dist-upgrade -y # Install initial build dependencies # Provides # Enables pip3.6 to access pypi sudo apt-get install libbz2-dev libssl-dev -y # Get and install Python3.6 wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz tar -xvf Python-3.6.8.tar.xz cd Python-3.6.8 sudo ./configure sudo make -j4 sudo make install # Update Python3.6 packages python3.6 -m pip install --upgrade pip setuptools --user # Install additional dependencies # Enables access to Tensorflow whl # Dependency for the h5py python package sudo apt-get install python3-pip libhdf5-dev -y # Install Tensorflow python3.6 -m pip install tensorflow==1.14.0 --user # Install OpenCV Dependencies sudo apt-get install build-essential cmake unzip pkg-config -y sudo apt-get install libjpeg-dev libpng-dev libtiff-dev -y sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev -y sudo apt-get install libxvidcore-dev libx264-dev -y sudo apt-get install libgtk-3-dev -y sudo apt-get install libcanberra-gtk* -y sudo apt-get install libatlas-base-dev gfortran -y # Download OpenCV and clarify naming scheme cd ~ wget -O opencv.zip https://github.com/opencv/opencv/archive/4.0.0.zip wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.0.0.zip unzip opencv.zip unzip opencv_contrib.zip mv opencv-4.0.0 opencv mv opencv_contrib-4.0.0 opencv_contrib cd ~/opencv mkdir build cd build cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \ -D ENABLE_NEON=ON \ -D ENABLE_VFPV3=ON \ -D BUILD_TESTS=OFF \ -D OPENCV_ENABLE_NONFREE=ON \ -D INSTALL_PYTHON_EXAMPLES=OFF \ -D BUILD_EXAMPLES=OFF .. # Increasing swap size to make OpenCV SWAPSIZE=2048 sudo sed -i "s/^CONF_SWAPSIZE.*/CONF_SWAPSIZE=${SWAPSIZE}/" /etc/dphys-swapfile # Restarting swap service sudo /etc/init.d/dphys-swapfile stop sudo /etc/init.d/dphys-swapfile start # Make OpenCV make -j4 # Install OpenCV sudo make install sudo ldconfig # Reseting swap size SWAPSIZE=100 sudo sed -i "s/^CONF_SWAPSIZE.*/CONF_SWAPSIZE=${SWAPSIZE}/" /etc/dphys-swapfile # Restarting swap service sudo /etc/init.d/dphys-swapfile stop sudo /etc/init.d/dphys-swapfile start # Link cv2 to Python3.6 cd /usr/local/lib/python3.6/site-packages/ sudo ln -s /usr/local/python/cv2/python-3.6/cv2.cpython-36m-arm-linux-gnueabihf.so cv2.so # In case git is not installed sudo apt-get install git -y # Getting codebases for spaCy, tensor2tensor, and RASA # NOTE: This is hard-coded for rasa-1.4.0 right now - let's make it more elegant soon cd ~ git clone https://github.com/explosion/spaCy git clone https://github.com/tensorflow/tensor2tensor git clone https://github.com/google/dopamine.git wget https://github.com/RasaHQ/rasa/archive/1.4.0.zip && unzip 1.4.0.zip # Installing spaCy export BLIS_ARCH=generic cd ~/spaCy python3.6 -m pip install -r requirements.txt --user python3.6 setup.py build_ext --inplace python3.6 -m pip install . --user # Installing dopamine-rl cd ~/dopamine sed -i '/opencv-python/d' setup.py sed -i '/dopamine-rl/d' setup.py python3.6 -m pip install . --user # Installing tensor2tensor cd ~/tensor2tensor sed -i '/opencv-python/d' setup.py python3.6 -m pip install . --user --force-reinstall # Installing other RASA dependencies sudo apt install libpq-dev/buster -y python3.6 -m pip install psycopg2 --user # Installing RASA cd ~/rasa-1.4.0 sed -i '/tensor2tensor/d' setup.py sed -i '/tensor2tensor/d' requirements.txt python3.6 -m pip install -r requirements.txt --user --force-reinstall python3.6 -m pip install . --user --force-reinstall # Script exit echo "" echo "" echo "------------------------------------------------------------" echo "Congratulations! Rasa is now installed on your Raspberry Pi." echo "To test rasa out, run python3.6 -m rasa init and start " echo "creating your bot!"
- Make the script executable by running
sudo chmod +x install.sh
- Execute the script by running
./install.sh | tee log.txt
- Place share
log.txt
here and let me know if you ran into any issues while installingThis process will take upwards of 3 hours so don't worry if it is taking longer than expected. Thanks for the help and looking forward to making sure this script is good to go!
TheCedarPrince
How can i share you my log.txt file ?
Hey @wochinge , @akelad , @JulianGerhard21 , I am reopening this issue as I want to see if the script Julian and I wrote can be independently verified. To test it, here is what you do:
- Download the latest version of Raspbian Lite onto a Raspberry Pi 4
- Copy this script onto the Raspberry Pi into
install.sh
:# Update the Raspberry Pi sudo apt-get update sudo apt-get upgrade -y sudo apt-get dist-upgrade -y # Install initial build dependencies # Provides # Enables pip3.6 to access pypi sudo apt-get install libbz2-dev libssl-dev -y # Get and install Python3.6 wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz tar -xvf Python-3.6.8.tar.xz cd Python-3.6.8 sudo ./configure sudo make -j4 sudo make install # Update Python3.6 packages python3.6 -m pip install --upgrade pip setuptools --user # Install additional dependencies # Enables access to Tensorflow whl # Dependency for the h5py python package sudo apt-get install python3-pip libhdf5-dev -y # Install Tensorflow python3.6 -m pip install tensorflow==1.14.0 --user # Install OpenCV Dependencies sudo apt-get install build-essential cmake unzip pkg-config -y sudo apt-get install libjpeg-dev libpng-dev libtiff-dev -y sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev -y sudo apt-get install libxvidcore-dev libx264-dev -y sudo apt-get install libgtk-3-dev -y sudo apt-get install libcanberra-gtk* -y sudo apt-get install libatlas-base-dev gfortran -y # Download OpenCV and clarify naming scheme cd ~ wget -O opencv.zip https://github.com/opencv/opencv/archive/4.0.0.zip wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.0.0.zip unzip opencv.zip unzip opencv_contrib.zip mv opencv-4.0.0 opencv mv opencv_contrib-4.0.0 opencv_contrib cd ~/opencv mkdir build cd build cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \ -D ENABLE_NEON=ON \ -D ENABLE_VFPV3=ON \ -D BUILD_TESTS=OFF \ -D OPENCV_ENABLE_NONFREE=ON \ -D INSTALL_PYTHON_EXAMPLES=OFF \ -D BUILD_EXAMPLES=OFF .. # Increasing swap size to make OpenCV SWAPSIZE=2048 sudo sed -i "s/^CONF_SWAPSIZE.*/CONF_SWAPSIZE=${SWAPSIZE}/" /etc/dphys-swapfile # Restarting swap service sudo /etc/init.d/dphys-swapfile stop sudo /etc/init.d/dphys-swapfile start # Make OpenCV make -j4 # Install OpenCV sudo make install sudo ldconfig # Reseting swap size SWAPSIZE=100 sudo sed -i "s/^CONF_SWAPSIZE.*/CONF_SWAPSIZE=${SWAPSIZE}/" /etc/dphys-swapfile # Restarting swap service sudo /etc/init.d/dphys-swapfile stop sudo /etc/init.d/dphys-swapfile start # Link cv2 to Python3.6 cd /usr/local/lib/python3.6/site-packages/ sudo ln -s /usr/local/python/cv2/python-3.6/cv2.cpython-36m-arm-linux-gnueabihf.so cv2.so # In case git is not installed sudo apt-get install git -y # Getting codebases for spaCy, tensor2tensor, and RASA # NOTE: This is hard-coded for rasa-1.4.0 right now - let's make it more elegant soon cd ~ git clone https://github.com/explosion/spaCy git clone https://github.com/tensorflow/tensor2tensor git clone https://github.com/google/dopamine.git wget https://github.com/RasaHQ/rasa/archive/1.4.0.zip && unzip 1.4.0.zip # Installing spaCy export BLIS_ARCH=generic cd ~/spaCy python3.6 -m pip install -r requirements.txt --user python3.6 setup.py build_ext --inplace python3.6 -m pip install . --user # Installing dopamine-rl cd ~/dopamine sed -i '/opencv-python/d' setup.py sed -i '/dopamine-rl/d' setup.py python3.6 -m pip install . --user # Installing tensor2tensor cd ~/tensor2tensor sed -i '/opencv-python/d' setup.py python3.6 -m pip install . --user --force-reinstall # Installing other RASA dependencies sudo apt install libpq-dev/buster -y python3.6 -m pip install psycopg2 --user # Installing RASA cd ~/rasa-1.4.0 sed -i '/tensor2tensor/d' setup.py sed -i '/tensor2tensor/d' requirements.txt python3.6 -m pip install -r requirements.txt --user --force-reinstall python3.6 -m pip install . --user --force-reinstall # Script exit echo "" echo "" echo "------------------------------------------------------------" echo "Congratulations! Rasa is now installed on your Raspberry Pi." echo "To test rasa out, run python3.6 -m rasa init and start " echo "creating your bot!"
- Make the script executable by running
sudo chmod +x install.sh
- Execute the script by running
./install.sh | tee log.txt
- Place share
log.txt
here and let me know if you ran into any issues while installingThis process will take upwards of 3 hours so don't worry if it is taking longer than expected. Thanks for the help and looking forward to making sure this script is good to go! TheCedarPrince
How can i share you my log.txt file ?
I am also facing same issue Any help?
Hi all,
I will be able to provide feedback this thursday afternoon with Rasa 1.8.
Ill post the details here asap.
Regards Julian
Hi,
With the last rasa version (1.8.0), i got this on my Raspberry 4 4GB with Ubuntu server 64 bits 18.04:
ERROR: Could not find a version that satisfies the requirement tensorflow<2.2,>=2.1 (from rasa) (from versions: none)
ERROR: No matching distribution found for tensorflow<2.2,>=2.1 (from rasa)```
I think that it's really not possible :'(
In case anybody is following the guide and running into the error:
ERROR: Could not find a version that satisfies the requirement tensorflow-addons (from tensor2tensor==
This is due to tensorflow-addons being added in later versions of tensorflow after the release of the guide. However Python3.6.8 pip on Jessie only installs tensorflow 1.14.1. Thanks for the guide it helped a lot!
There's also a recent forum post with a Docker image for Raspberry Pi here
Rasa 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:
Any suggestions on any potential work-arounds?
Here is what I tried so far:
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:
Install Berryconda package manager:
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:
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):
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!