Installation

The recommended way to get started with Rasa is via pip:

    
pip install rasa-x --extra-index-url https://pypi.rasa.com/simple
copied!

This will install both Rasa and Rasa X. If you don’t want to use Rasa X, run pip install rasa instead.

Unless you've already got numpy & scipy installed, we highly recommend that you install and use Anaconda.

If you want to use the development version of Rasa, you can get it from GitHub:

git clone https://github.com/RasaHQ/rasa.git
cd rasa
pip install -r requirements.txt
pip install -e .

Windows Prerequisites

Make sure the Microsoft VC++ Compiler is installed, so python can compile any dependencies. You can get the compiler from Visual Studio. Download the installer and select VC++ Build tools in the list.

NLU Pipeline Dependencies

Rasa NLU has different components for recognizing intents and entities, most of which have some additional dependencies.

When you train your NLU model, Rasa will check if all required dependencies are installed and tell you if any are missing. The page on Choosing a Pipeline will help you pick which pipeline to use.

Note

If you want to make sure you have the dependencies installed for any component you might ever need, and you don’t mind the additional dependencies lying around, you can use

pip install -r alt_requirements/requirements_full.txt

to install everything.

Great for getting started: pretrained embeddings from spaCy

The pretrained_embeddings_spacy pipeline combines a few different libraries and is a popular option. For more information check out the spaCy docs.

You can install it with the following commands:

pip install rasa[spacy]
python -m spacy download en_core_web_md
python -m spacy link en_core_web_md en

This will install Rasa NLU as well as spacy and its language model for the English language. We recommend using at least the “medium” sized models (_md) instead of the spacy’s default small en_core_web_sm model. Small models require less memory to run, but will somewhat reduce intent classification performance.

First Alternative: Tensorflow

To use the supervised_embeddings pipeline you will need to install Tensorflow and, for entity recognition, the sklearn-crfsuite library. To do this, simply run the following command:

pip install rasa

Second Alternative: MITIE

The MITIE backend performs well for small datasets, but training can take very long if you have more than a couple of hundred examples. We may deprecate the MITIE backend in the future.

First, run

pip install git+https://github.com/mit-nlp/MITIE.git
pip install rasa[mitie]

and then download the MITIE models. The file you need is total_word_feature_extractor.dat. Save this anywhere. If you want to use MITIE, you need to tell it where to find this file (in this example it was saved in the data folder of the project directory).

The complete pipeline for MITIE can be found here

language: "en"

pipeline:
- name: "MitieNLP"
  model: "data/total_word_feature_extractor.dat"
- name: "MitieTokenizer"
- name: "MitieEntityExtractor"
- name: "EntitySynonymMapper"
- name: "RegexFeaturizer"
- name: "MitieFeaturizer"
- name: "SklearnIntentClassifier"

Using MITIE alone can be quite slow to train, but you can use it with this configuration.

language: "en"

pipeline:
- name: "MitieNLP"
  model: "data/total_word_feature_extractor.dat"
- name: "MitieTokenizer"
- name: "MitieEntityExtractor"
- name: "EntitySynonymMapper"
- name: "RegexFeaturizer"
- name: "MitieIntentClassifier"

Next Step

Now that you have everything installed, head over to the tutorial!