![](/img/trans.png)
[英]checking the version of chatter using python -m chatterbot --version.This is the error
[英]I'm getting error when using the chatterbot in python 3.x
所以這是我的代碼:
from chatterbot.trainers import ListTrainer
from chatterbot import chatbot
bot = chatbot('Dona')
conv = open('sample.txt', 'r').readlines()
bot.set_trainer(ListTrainer)
bot.train(conv)
while True:
query = input("You: ")
reply = bot.get_response(query)
print("Bot: ", response)
我得到了這個錯誤,我認為它無法導入程序
enter code here
from pytz import UTC
ModuleNotFoundError: No module named 'pytz'
這是最后一行錯誤。
將pytz安裝到您的 python 環境中:
pip install pytz
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.