0

Trying to build a sample chatbot using Python's chatterbot. I am using conda for virtual environment and Jupyter to run the code.

I have installed and tried to run the chatterbot according to this post:

Can not install chatterbot in Anaconda

However, after running the following command:

from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer

chatbot = ChatBot('Ron Obvious')

I get this 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.

I have looked at these solutions: https://github.com/gunthercox/ChatterBot/issues/1736 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

... and per instructions, installed the following:

python -m spacy download en_core_web_md
python -m spacy link en_core_web_md en

after which I got the message:

You can now load the model via spacy.load('en_core_web_md')

and

You can now load the model via spacy.load('en')

However, the code still generates the same error. I have checked the conda environment, and it does have the following (from Jupyter):

!conda list -n py37_chatterbot

...
chatterbot                1.0.8                    pypi_0    pypi
chatterbot-corpus         1.2.0                    pypi_0    pypi
spacy                     3.0.5            py37h3b38789_0    conda-forge
spacy-legacy              3.0.1              pyhd8ed1ab_0    conda-forge
...

Where should I go from here troubleshooting this issue?

Feyzi Bagirov
  • 1,292
  • 4
  • 28
  • 46

0 Answers0