I did a pip install chatterbot
.
and I imported the same in a python program which while running showed a
module not found error.
I did a pip install chatterbot
.
and I imported the same in a python program which while running showed a
module not found error.
Can you confirm that the pip install initially worked without any errors? If there was an issue there, it is likely due to the module name that you're using.
If that's not the case, do you know which version of python you're using? The problem may be that you're using python 3. In which case try pip3 install chatterbot
instead.
First, check if this module really exists in system using pip freeze
. If it shows your module installed, then check for correctness in import string, and make sure that your pip points to the interpreter you're using. If you're using venv, it must also be taken account for.
Second, take note that the chatterbot.ChatBot needs to be imported like
from chatterbot import ChatBot
, not just import ChatBot
.
Best of luck!
Do you use Windows or Linux? If you use Windows. Did you set the enviroment variables?