を使用してpython 3.x
います。このコードの実行中にエラーが発生します:
from chatterbot.trainers import ListTrainer # method to train the chatbot
from chatterbot import ChatBot # import the chatbot
bot = ChatBot('Test')
conv = open('chats.txt', 'r').readlines()
bot.set_trainer(ListTrainer) # set the trainer
bot.train(conv) # train the bot
while True:
request = input('You: ')
response = bot.get_response(request)
print('Bot: ', response)
エラー:
module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'chatterbot.trainers'; 'chatterbot' is
not a package
このエラーを修正するにはどうすればよいですか?