【发布时间】:2021-01-21 05:24:12
【问题描述】:
我正在尝试使用 Chatterbot 构建一个简单的聊天机器人并使用它的语料库。
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
chatbot = ChatBot('Charlie')
corpus_trainer = ChatterBotCorpusTrainer(chatbot)
corpus_trainer.train('chatterbot.corpus.english')
response = chatbot.get_response(input())
print(response)
当我运行时,我收到一条错误消息,提示 No such file or directory for the English corpus。
所以我尝试通过运行pip install chatterbot_corpus 安装chatterbot 语料库,但不断收到以下错误
错误:无法卸载“PyYAML”。这是一个 distutils 安装的项目 因此我们无法准确确定哪些文件属于它 这只会导致部分卸载。
我也运行了conda remove PyYAML 并再次尝试,但仍然出现同样的错误。
【问题讨论】:
标签: python installation conda pyyaml chatterbot