No module named rasa_sdk when trying to write custom action in actions.py

I’m trying to write a new custom action in actions.py. As the document mentioned, i installed rasa-sdk using

pip3 install rasa-sdk

But when i run my actions.py, it gives me an error named

File “actions.py”, line 34, in from rasa_sdk import Action ImportError: No module named rasa_sdk

So in my code how i imported was like below. (Instead of rasa_sdk i even tried rasa_core_sdk)

from rasa_sdk import Action
from rasa_sdk.events import SlotSet

it seems that it wasn’t installed, do you use the same environment?

@Ghostvv yea, i use python 3.6 with pip3

do these imports work in python shell?

@Ghostvv nope, i tried that, it shows the same error.

it means, it is not installed

i think i found the problem. All these times i’ve used the keyword python instead of python3. My bad. It was a environment issue. Since i used python3 interpreter with pip3 i thought my environment was ok. But i haven’t used python3 keyword before i run my code. My bad. @Ghostvv thanks a lot for the help :slightly_smiling_face: