No module named 'rasa.nlu.components'


@HAMDI please can you share rasa --version ?

OR please see this blog for how to use custom components : How to Enhance Rasa NLU Models with Custom Components | Rasa Blog | The Rasa Blog | Rasa

I hope this will help you!

Thanks bro it work but i have another issue with rasa x ModuleNotFoundError: No module named ‘rasa.shared’

@HAMDI Can I request to please close this thread first as a solution, as the next issue is not related to the main issue.

1 Like

@HAMDI can you share rasa --version for me whilst activating the env?

rasa = 1.10.10 rasa-x = 1.0.1

@HAMDI can you please run this command rasa --version while activating your environment, please? and share the screenshot.

@nik202 I am also getting the same error. Can you please help?

I have this issue in rasa 3.5.1 on Ubuntu. I don’t see that this was ever resolved? What’s the solution?

why is “rasa --version” marked as a solution?..

The solution exists in side the linked mentioned. Hope this helps you ?

I am still facing the same issue with rasa 3.5.1. Downgrading it to 3.4.0 also did not work. Can you let me know what the solution is ?

Hi @sambitmallick ,

Rasa combined NLU and Core into one unit from Rasa 3.x version. May I know what is your requirement

Hi @anoopshrma :

I wanted to use custom components. For this I need below libraries:

from rasa.nlu.components import Component

from rasa.nlu import utils

from rasa.nlu.model import Metadata

However I am getting the error:

ModuleNotFoundError: No module named ‘rasa.nlu.components’

You can check this out Custom Graph Components

i have the same error in rasa 3.5.1, python 3.8.0 when i run the file python, i get the error " from rasa.nlu.components import Component ModuleNotFoundError: No module named ‘rasa.nlu.components’ " I tried to solve this error but no solution Who can help me please

I am facing the exact issue with the Rasa module ‘rasa.nlu.components’. Specifically, I am receiving the error message “ModuleNotFoundError: No module named ‘rasa.nlu.components’”. I have tried different versions of Python and Rasa, but the issue still persists.

Here are the system details:

  • Rasa Version: 3.5.4
  • Minimum Compatible Version: 3.5.0
  • Rasa SDK Version: 3.5.0
  • Python Version: 3.7.2
  • Operating System: Linux-5.19.0-38-generic-x86_64-with-debian-bookworm-sid
  • Python Path: /home/ubuntuadmin/anaconda3/envs/RASA/bin/python

I have attempted to install ‘rasa-nlu’ separately, but encountered package compatibility errors. However, based on my understanding, a separate package isn’t necessary.

Hi @vicesan ,

Yes you are not required to install a separate package, From Rasa 3.x Rasa has merged NLU and CORE into one single entity.

If you want to use NLU part to train your NLU model out of rasa environment then you will have to do the following

from rasa.model_training import train_nlu

And if you want to train your Rasa nlu model inside rasa environment then use rasa train nlu

I hope this will solve your issue.

Yes, sorry, I must’ve had trouble viewing the entire post on my prior visit. I am no longer having this issue. Cheers.

what did u do, i still have the same problem of ModuleNotFoundError: No module named ‘rasa.nlu.components’