pythonchatterbot

Python could not find module named chatterbot


I changed my laptop lately, so I've been installing the packages I use. After I've installed chatterbot

C:\Users\aser>pip show chatterbot
Name: ChatterBot
Version: 1.0.4
Summary:
Home-page: None
Author: None
Author-email: None
License: None
Location: c:\users\aser\appdata\roaming\python\python38\site-packages
Requires: chatterbot-corpus, sqlalchemy, python-dateutil, mathparse, nltk, pint, pymongo
Required-by: 

And I tried to use it:

from chatterbot import ChatBot
# Code goes here

I got a ModuleNotFound error:

Traceback (most recent call last):        
  File "c:/Users/aser/Desktop/pyapp01/app.py", line 22, in <module>      
    from chatterbot import ChatBot        
ModuleNotFoundError: No module named 'chatterbot'

Any help?? Or is it installed in a location where it shouldn't be?? But all the other packages are installed in this same location too


Solution

  • There is a dedicated Github repo for Chatterbot, and I found the issue Not able to import chatterbot after successful installation #826.

    Several other users had the same problems after installing Chatterbot via pip, so you might want to read the responses the developers gave them.

    It seems there are issues with package dependencies and in some cases, de-installation and re-installation in a particular order seemed to have helped.

    In general, however, I agree with the comments above that working in the Anaconda environment is much more convenient. I also used "pip" a lot when I started coding but gave up on it after I ran into too many installation issues.

    The danger always is that you are creating potentially conflicting environments, and Anaconda saves you from such pitfalls.