ImportError: No module named 'chatterbot'

-2

Does anyone help me? My code gives the following error:

Traceback (most recent call last):
  File "main.py", line 1, in <module>
    from chatterbot import ChatBot
ImportError: No module named 'chatterbot'

So here's main.py:

from chatterbot import ChatBot    
chatbot = ChatBot("Ron Obvious")
from chatterbot.trainers import ListTrainer # treinador
import os
bot = ChatBot('Teste')
bot.set_trainer(ListTrainer)
for arq in os.listdir('arq'):
    chats = open ('arqs/' + arq, 'r'). readlines()
    bot.train(chats)
while True:
    resq = input('Você: ')
    resp = bot.get_response(resq)
    print('Bot: ' + resp)
    
asked by anonymous 05.08.2018 / 20:14

1 answer

0

Try to install the chatterbot lib. The installation is done through the terminal of your operating system

  

pip3 install chatterbot

    
07.08.2018 / 17:23