ERROR : No module named 'rasa.core'

I tried to run this command. from rasa.core.channels.socketio import SocketIOInput

But i am facing an error. PLease help me.

ModuleNotFoundError: No module named ‘rasa.core’

hey @Superbatman, welcome to the community :slight_smile:.

Can you tell me which version of rasa have you installed?

hey, rasa version 1.9.5

are you using windows or linux?

windows

how did you installed rasa, did you installed using pip or conda?

using pip , by creating a new virtual env in anaconda

I think so you have installed rasa in anaconda, so you need to activate the anaconda env and run the above code in that environment.

I had activated my environment. I had also trained the model. I am trying to deploy the model using a flask server.

from socketio import Server
from rasa.core.channels.socketio import SocketIOInput
from rasa.core.agent import Agent
from rasa.core.interpreter import RegexInterpreter
from rasa.core.interpreter import RasaNLUInterpreter
from rasa.core.utils import EndpointConfig
from rasa.core.policies import KerasPolicy, MemoizationPolicy

# load your trained agent
interpreter = RasaNLUInterpreter('rasa/models/nlu-20200413-113428.tar.gz')
agent = Agent.load('rasa/models/core-20200413-113630.tar.gz', 
	interpreter=interpreter, 
	action_endpoint=EndpointConfig('http://localhost:5055/webhook')
    #for action endpoint
)

input_channel = SocketIOInput(
    # event name for messages sent from the user
    user_message_evt="user_uttered",
    # event name for messages sent from the bot
    bot_message_evt="bot_uttered",
    # socket.io namespace to use for the messages
    namespace=None
)

# set serve_forever=True if you want to keep the server running
s = agent.handle_channels([input_channel], 5500, serve_forever=True)

i was trying to run the above code and i started facing the error mentioned.

Okay I don’t know where the issues lies since you are using the latest version and you are facing the above, can you just show me the output of pip list

actually there is a big list of them can you tell me what module version you want to know?

hey @Superbatman, ok I got it. I don’t know where’s the exact issue. sorry I would require you to do one more try :sweat_smile:, just try the below code in your the command prompt by running python:

check if you get the same output.

click on the 2nd image. It’s in the last

@JiteshGaikwad Please tag anyone from rasa community , who can solve this issue. Please! This project is important for me.I should submit it by this sunday. So please help me.

@erohmensing, can you please look into the issue :slight_smile:

can you please tag any other person.

same problem here