3

I have installed rasa using:

pip3 install rasa

When I try to use rasa commands like:

rasa init

I get zsh errors:

command not found: rasa error

I am on Mac OS Catalina, using:
Python version 2.7.16
Python3 version 3.7.6
pip version 19.2.3

My path variable looks like this:

/Library/Frameworks/Python.framework/Versions/3.7/bin
:/usr/local/bin
:/usr/bin
:/bin
:/usr/sbin
:/sbin 
OhleC
  • 2,821
  • 16
  • 29
Nikhil Bansal
  • 163
  • 3
  • 16

7 Answers7

4

RASA is currently incompatible with python 3.9+

I'm having python 3.10, and have to switch to python 3.8 for working with Rasa.

To save yourself time:

1. Install python 3.8

2. Create and activate virtual environment:

py -3.8 -m pip install virtualenv 
py -3.8 -m virtualenv venv
venv\Scripts\activate

3. Upgrade pip

py -3.8 -m pip install -U pip

4. Install Rasa

pip install rasa

5. Check installation

rasa -h

You should see something like:

usage: rasa [-h] [--version] {init,run,shell,train,interactive,telemetry,test,visualize,data,export,x,evaluate} ...

Rasa command line interface. Rasa allows you to build your own conversational assistants . The 'rasa' command allows
you to easily run most common commands like creating a new bot, training or evaluating models.
...
William Le
  • 825
  • 1
  • 9
  • 16
3

I also got the similar error in ubuntu, you can try these set of command:

pip install -U pip
pip install rasa

The first command will update the python package manager and the second will install rasa. If pip install rasa is not working, then you can try pip3 install rasa

saeed foroughi
  • 1,662
  • 1
  • 13
  • 25
Vishal
  • 51
  • 5
3

I had followed these following steps and it's working fine for me

Firstly, create a directory name of your choice and get inside of it

mkdir rasaprojects #directory name of your choice in place of rasaprojects
cd rasaprojects   #get inside that directory

Now create virtual environment of python3

virtualenv rasaenv -p python3 #write your environment name instead of rasaenv

Now activate the environment

source rasaenv/bin/activate

Finally you are good to go with rasa installation

pip3 install rasa
B--rian
  • 5,578
  • 10
  • 38
  • 89
1

I add ~/.local/bin to my $PATH in .bashrc, and It resolved the problem:

  1. Go to the home directory:

    cd
    
  2. Find your file location (for me it was ./.bashrc):

    sudo find -name .bashrc
    
  3. Open .bashrc by nano:

    nano ./.bashrc
    
  4. Add next code at the end of the file:

    export PATH="$HOME/.local/bin:$PATH"
    
  5. Restart your shell.

Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
Arti
  • 11
  • 1
0

You should activate your python env, create a folder with mkdir and then open it with cd and then: rasa init --no-prompt (ubuntu user)

Thomas Nelson
  • 693
  • 5
  • 17
eljana
  • 9
  • 1
  • 1
0

I solved this problem by downgrading python specifically 3.6.8. However, you can install any version from Python 3.6.x to 3.8.x, and NOT 3.9.

Tips: Don't add variable paths while installing multiple versions of python.

In my case, I had 3.9 python and didn't want to uninstall it because I was a working project on the 3.9 version. If you have the same case, then follow the steps. Otherwise, you can alter step2 : python -m venv project_name\venv

Step 1: Install python from above given ranges. Again, please don't install python 3.9 because it is not currently compatible.

Step 2: Delete the existing virtual environment, if you have already created it while priviously installing the rasa. Make new one

> C:\Users\name\AppData\Local\Programs\Python\Python36\python -m venv project_name\venv

(venv: name of the virtual environment)

This command allows creating a new virtual environment with python just you installed it through step1. You can check python -m version

Step 3: Activate the environment

> project_name\venv\Scripts\acitvate.bat

Step 4: Finally, start installing the rasa:

> pip install rasa

Step 5:

> rasa init

Note: I wasn't using anaconda. If you are currently using an anaconda environment, please do needful with the above steps.

If you still cannot resolve it, please follow thread or you can post there your specific query.

code_conundrum
  • 529
  • 6
  • 12
0

other way to do it using docker so will be no issues. 1.make new directory example rasadocker and open terminal or command prompt

2.run following command docker run --user 1000 -v $(pwd):/app rasa/rasa:3.1.0-full init --no-prompt here --user 1000 for no error of user permission ,-v is for volume, pwd is current directory, :/app is volume in docker image , rasa/rasa is rasa docker image with tag 3.1.0-full ,important thing here to create a project we use init 3.you can see in current folder project required files are added 4.to play with bot run following command `

docker run --user 1000 -it -v $(pwd):/app rasa/rasa:3.1.0-full shell opens shell where bot asks you input

`

zoro
  • 109
  • 8