Rasa Core Training Fails Under Old and New Versions Of Python

Setup on Ubuntu. NLU trained fine. Core training was throwing a syntax error. Read the docs/posts and installed newest python 3x (per postings) and also modified the Makefile to call newer version of Python. The error changed from “Invalid Syntax” on the default Python 2x to “No module named rasa_core for Python 3x”. Core “is” installed/reinstalled via PIP BTW. See attached screenshot. I ran the command with both versions of Python so you can see the different errors that are thrown.

I am out of ideas at this point. I don’t see any postings that remotely resemble this issue.

UPDATE: THE INSTRUCTIONS ARE OUT OF DATE AS OF 3/8/2019

If you don’t have Python3 installed then install Python3.x (latest version) Install PIP3 Then run the following edited commands: pip3 install rasa_core and then pip3 install rasa_nlu[tensorflow]

Get the starter pack

git clone https://github.com/RasaHQ/starter-pack-rasa-stack.git

The docs tell you to do this next… WRONG - ``` python -m spacy download en

Do this instead pip3 install -U spacy and then python3 -m spacy download en

Change directories to: cd starter-pack-rasa-stack Use an editor (VI perhaps) to edit your Makefile

Change “all” references of python to python3 in this file. python --> python3 Save the file and exit.

Now run “make train-nlu” and “make train-core” they should run fine. My train-core process was blowing up left and right (see previous comments).

I had to read lots of disparate and disconnected posts and burn a lot of hours to figure this out. I hope this helps the next poor soul who tries to install this on Ubuntu from scratch.

First time took me hours. After figuring this out, I rebuilt my Ubuntu image and started over. This time, following the above instructions, it took less than 10 minutes to get it running.

BTW, Apologies for the weird bolded text and the ugly formatting. I tried to format this with the editor but the editor needs work. :slight_smile:

Enjoy!!!

Yeah, I ran into similar issues, and had just aliased all references to python2 to python3 stuff, which fixed the issue. They have a lot of portions of their docs that are just plain out of date – I was planning on pitching in and helping getting them updated, since I had so much trouble as well.

I’d recommend for anyone else reading this thread to start using the Docker images if possible, since their images help allow for you to train and run in their environment, which avoids headaches like these :wink:

Thanks for the feedback. I am going to install it under Docker myself. I wanted to start with a bare minimum setup. I am doing some testing right now to verify that this product and all the other installed components work and play well together and are a good fit for my project. Once I get my build finalized, I am going to package it up.

Hi niveK. I just made another post. Tried to install the docker image per the instructions. Issues encountered. Maybe you have seen this one as well. :slight_smile: