pip install -r requirements.txt
python -m spacy download en_core_web_sm
- Make sure you actually have the right spacy model installed.
For example, installen_core_web_sm
with thepython -m spacy download en_core_web_sm
command in the terminal.
Next, fix this error:
FileC:\Users\USER\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\tagging.py
, line 13, in init
self.nlp = spacy.load(self.language.ISO_639_1.lower())
That is
Open theC:\Users\USER\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\tagging.py
file
Go to Line 13
Replace
self.nlp = spacy.load(self.language.ISO_639_1.lower())
with
if self.language.ISO_639_1.lower() == 'en': self.nlp = spacy.load('en_core_web_sm') else: self.nlp = spacy.load(self.language.ISO_639_1.lower())
You will need to add more conditions for other languages you need to support
- After that run using
python bot.py
.