Code

Installing Rasa in Windows and Linux (Ubuntu)

October 31, 2021
3 min
By
Udara
Share

Conversational AI is gaining popularity over the past few years, where all the popular websites are now being included with a Chatbot. Creating an AI assisted chatbot is getting simpler now, so that a person with less or no knowledge about Machine Learning and Natural Language Processing can build their own chatbot from scratch with a basic programming knowledge.

Visit Rasa documentation for a detailed explanation.

Rasa Installation

Rasa is based on Python and installed using python package installer (pip). It is highly recommended to create a virtual environment before installing Rasa.

Windows

First download and install Microsoft Visual C++Build Tools

Check whether your system has already installed Python 3.7 using following commands in the command prompt. If not, install Python 3 here and make sure you tick the option Add to PATH variable in the installer. If you have installed both Python 2 and Python 3, python3 should be used instead of python.

Check whether you have installed pip3 using the following commands. If not, install pip here.

or

Create a new virtual environment for rasa.

Your command prompt should look like following if the virtual environment is properly activated.
(venv) C:\Users\user

Upgrade your pip to the latest version

Install Rasa on the virtual environment . This may take several minutes.

Use the following command to check if Rasa is installed correctly

Ubuntu (Linux)

Run the following command in terminal to see if python 3.7 and pip are already available.

If python 3.7 is not installed, install it using following commands.

Create a new virtual environment for Rasa and activate it.

Your command prompt should look like following if the virtual environment is properly activated.
(venv)/root/>

Upgrade your pip to the latest version

Install Rasa on the virtual environment. This may take several minutes.

Use the following command to check if Rasa is installed correctly.

Congratulations! Now you have successfully installed Rasa.

Creating a New Project

The virtual environment should be activated before running Rasa.

Windows — in command prompt

Ubuntu — in terminal

To create a new project, run:

Select an installation path and train the initial model. This will take several minutes depending on the system hardware.

Once the training has been finished, the bot will be loaded automatically. To run the bot manually, navigate to the created folder and type:

You can type a message and see how the bot responds.

Congratulations! You have created your first Rasa project.

More news