-1

I have installed chatterbot and now I am running a file using it but I am facing following error.....

OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.

Please help me to fix this.

code is as following....

from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer


chatbot = ChatBot("Ron Obvious")



conversation = [
    "Hello",
    "Hi there!",
    "How are you doing?",
    "I'm doing great.",
    "That is good to hear",
    "Thank you.",
    "You're welcome."
]

trainer = ChatterBotCorpusTrainer(chatbot)

trainer.train(conversation)

response = chatbot.get_response("Good morning!")
print(response)
Zubad Ibrahim
  • 371
  • 2
  • 14

2 Answers2

1

Firstly, while opening the Anaconda Prompt, right-click on it and run as administrator and then try

python -m spacy download en_core_web_sm

for linking en_core_web_sm to en, follow this command

python -m spacy link en_core_web_sm en

This shall resolve both errors.

mode
  • 69
  • 5
0

you need to download the required packages

try this

python -m spacy download en

  • I am having the same trouble and I downloaded the required packages as you said, however I am getting `Creating a shortcut link for 'en' didn't work (maybe you don't have admin permissions?)` – motipai Sep 04 '20 at 16:42