Installation errors on Ubuntu 20.4

I am installing rasa 3 on ubuntu 20.4 and python 3.8.10 Have gone through the usual process of creating venv , activating it, and then ‘pip3 install rasa’. The install completes but the errors below are displayed. Also, when I do ‘pip list’ I see Rasa 3.0.4 installed.

Following is the output when I do 'rasa --version':
Traceback (most recent call last):
  File "/home/vin/rasaprojects/venv/bin/rasa", line 5, in <module>
    from rasa.__main__ import main
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/rasa/", line 14, in <module>
    from rasa.cli import (
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/rasa/cli/", line 9, in <module>
    import rasa.core.utils
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/rasa/core/", line 25, in <module>
    from sanic.views import CompositionView
ImportError: cannot import name 'CompositionView' from 'sanic.views' (/home/vin/rasaprojects/venv/lib/python3.8/site-packages/sanic/

@vink confirm me at the time of the installation process did you get any warnings or compatibility issues?


Can you try downgrading sanic version? for me sanic==21.9.3 worked and even share the rasa --version please

pip install sanic==21.9.3

I hope this will solve your issue if it’s related to CompositionView. Good Luck!

The second screenshot shows the incompatibility errors. I installed the correct versions. Now, I am getting the following error:

rasa --version
Traceback (most recent call last):
  File "/home/vin/rasaprojects/venv/bin/rasa", line 5, in <module>
    from rasa.__main__ import main
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/rasa/", line 14, in <module>
    from rasa.cli import (
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/rasa/cli/", line 7, in <module>
    from rasa.core.tracker_store import TrackerStore
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/rasa/core/", line 22, in <module>
    from boto3.dynamodb.conditions import Key
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/boto3/", line 16, in <module>
    from boto3.session import Session
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/boto3/", line 17, in <module>
    import botocore.session
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/botocore/", line 29, in <module>
    import botocore.credentials
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/botocore/", line 35, in <module>
    from botocore.config import Config
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/botocore/", line 16, in <module>
    from botocore.endpoint import DEFAULT_TIMEOUT, MAX_POOL_CONNECTIONS
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/botocore/", line 22, in <module>
    from botocore.awsrequest import create_request_object
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/botocore/", line 24, in <module>
    import botocore.utils
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/botocore/", line 32, in <module>
    import botocore.httpsession
  File "/home/vin/rasaprojects/venv/lib/python3.8/site-packages/botocore/", line 10, in <module>
    from urllib3.util.ssl_ import (
ImportError: cannot import name 'PROTOCOL_TLS' from 'urllib3.util.ssl_' (/home/vin/rasaprojects/venv/lib/python3.8/site-packages/urllib3/util/

@vink have you seen this video, I know it’s old but please have a look, or if you already did? Installing Rasa Open Source on Ubuntu - YouTube . I’d recommend starting with the fresh.

Thanks Nimit. Following are my steps to make the installation work.

mkdir rasa3
cd rasa3
python3 -m venv ./venv
source ./venv/bin/activate
pip3 install rasa[full]

pip3 install sanic==21.9.3
pip3 install requests==2.25.1
rasa --version
Rasa Version      :         3.0.4
Minimum Compatible Version: 3.0.0
Rasa SDK Version  :         3.0.2
Rasa X Version    :         None
Python Version    :         3.8.10
Operating System  :         Linux-5.4.0-91-generic-x86_64-with-glibc2.29
rasa init
Welcome to Rasa! 🤖

To get started quickly, an initial project will be created.
If you need some help, check out the documentation at
Now let's start! 👇🏽

? Please enter a path where the project will be created [default: current directory]

@vink Great Vineet. Finally! All suggestion work for you.Can I request to please close this thread as solution for others and for your own reference please. Good Luck!