0

I’ve got this error, just following the « Getting Started with Rasa » tutorial

So I’ve typed:

sudo pip3 install rasa-x --extra-index-url https://pypi.rasa.com/simple

which seems to work fine but when I’ve typed:

sudo rasa init

I’ve got a lot of errors among them:

rasa.core.policies.ensemble.InvalidPolicyConfig: Module for policy ‘MemoizationPolicy’ could not be loaded. Please make sure the name is a valid policy.

Alex Bravo
  • 1,601
  • 2
  • 24
  • 40
Claude COULOMBE
  • 3,434
  • 2
  • 36
  • 39

4 Answers4

2

I faced the same problem when I tried using - rasa init. This is solved by paying attention to 2 things. When you try to install rasa using - pip install rasa in a virtual environment. This install latest python version, in my case this was 3.8, but the problem was that TensorFlow support was not available for 3.8, So I will suggest-

 conda create --name rasa python=3.6 

For anaconda or you could also create a virtual environment. Now use

pip install rasa

Now you will notice TensorFlow==1.15.1 will be installed. For rasa to work we will need TensorFlow==1.15.0

pip uninstall tensorflow
pip install tensorflow-cpu==1.15.0

if you want CPU support only otherwise,

pip install tensorflow==1.15.0

This worked for me.

piyush
  • 37
  • 2
  • 9
0

In fact, it was a dependencies nightmare.

So what I’ve done to get a rasa chatbot up and running:

  1. Reinstall dask (but I’m not sure this step is mandatory)

sudo pip3 install "dask[complete]"

  1. Downgraded my version of pandas

sudo pip3 install pandas==0.19.2

  1. Upgraded tqdm

sudo pip3 install -U tqdm

  1. Upgraded OpenAI gym

sudo pip3 install -U gym

Et voilà!

Claude COULOMBE
  • 3,434
  • 2
  • 36
  • 39
0

This is a library mismatch error. It is Rasa version error, you most probably installed Rasa 1.7.0 or 1.8.0 you need to downgrade to 1.6.0. After downgrading it solved my problem.

Commands to run :

pip uninstall rasa

After you uninstall, re-install rasa by running the commands

pip install rasa==1.6.0

or

python -m pip install rasa==1.6.0

iDKYamHere
  • 41
  • 4
0

Try using rasa-x rather than rasa library:

virtualenv -p 3.6.8 rasaenvx

rasaenvx\Scripts\activate

pip3 install rasa-x --extra-index-url https://pypi.rasa.com/simple

rasa init --no-prompt