pythonchatbotpython-3.7chatterbot

ImportError: cannot import name 'chatbot' from 'chatterbot'


hey guys I'm getting this error, trying to build a chatbot

Traceback (most recent call last):
  File "C:\Users\Edwrd\AppData\Local\Programs\Python\Python37-32\FRIDAY.py", line 2, in <module>
    from chatterbot import Chatbot
ImportError: cannot import name 'Chatbot' from 'chatterbot' (C:\Users\gabri\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\__init__.py)

Solution

  • You need to use from chatterbot import ChatBot

    Instead of from chatterbot import Chatbot like you have it

    Just a heads up: generally with import errors like this, it's a spelling issue :)