Rasa 3 - Cannot install - pip - sanic


I have recently tried to move from Rasa 2 to Rasa 3.

With my pip version 21.2.2, installation takes forever (more than 5 hours), and ultimately fails. I have tried several different python version (3.7, 3.8, 3.9) in separate anaconda environments and get the same problem every time.

Now I have also seen that installing Rasa 2.8 takes quite some time with this pip version. However, for Rasa 2.8 it works to just downgrade pip to 20.2. If I do the same for Rasa 3, I get the following errors:

sanic-plugin-toolkit 1.2.1 requires sanic<21.12.0,>=21.3.1, but you'll have sanic 21.12.1 which is incompatible.
sanic 21.12.1 requires multidict<6.0,>=5.0, but you'll have multidict 6.0.2 which is incompatible.

While rasa 3.0.5 shows up as being installed when I type “conda list”, just getting the rasa version in the anaconda terminal fails:

ImportError: cannot import name 'CompositionView' from 'sanic.views' (c:\users\annaf\anaconda3\envs\rasa3-pip\lib\site-packages\sanic\views.py)

So now while I would like to move to Rasa 3, I do not see any way to do that.

It would be great if you could help me!

@annaf Can you tell which machine/os you are working? Please if you can share rasa --version ?

Try downgrade sanic version, sanic==21.9.3 [for rasa 3.x]

I hope this will solve both of your errors? If not please update me.

@nik202 Ah it worked!

I typed the following in my anaconda environment as you suggested:

python -m pip install --upgrade sanic==21.9.3

And now when I type rasa --version I no longer get the error I had earlier and indeed get the version:

Rasa Version      :         3.0.5
Minimum Compatible Version: 3.0.0
Rasa SDK Version  :         3.0.4
Rasa X Version    :         None
Python Version    :         3.8.12

Thanks a lot!

@annaf Good!. Can I request you to close this thread as solution for other. Thanks and good luck!