我有一个导入 chatterbot 的代码。我运行 python -m spacy 下载 en python terminal1.py。
terminal1.py '''' 导入 spacy
from chatterbot import ChatBot
# Uncomment the following lines to enable verbose logging
# import logging
# logging.basicConfig(level=logging.INFO)
# Create a new instance of a ChatBot
bot = ChatBot(
'Terminal',
storage_adapter='chatterbot.storage.SQLStorageAdapter',
logic_adapters=[
'chatterbot.logic.MathematicalEvaluation',
'chatterbot.logic.TimeLogicAdapter',
'chatterbot.logic.BestMatch'
],
database_uri='sqlite:///database.db'
)
print('Type something to begin...')
# The following loop will execute each time the user enters input
while True:
try:
user_input = input()
bot_response = bot.get_response(user_input)
print(bot_response)
# Press ctrl-c or ctrl-d on the keyboard to exit
except (KeyboardInterrupt, EOFError, SystemExit):
break
''''
我得到错误
OSError:[E050] 找不到型号“en”。它似乎不是快捷链接、Python 包或数据目录的有效路径。
有人可以帮我解决这个问题并在此过程中运行代码。我将不胜感激。