Chatterbot: error:no module name 'en'

Created on 3 Sep 2020  路  8Comments  路  Source: gunthercox/ChatterBot

no module name 'en' error is coming ``from chatterbot import ChatBot
bot=ChatBot(
'Friday',
storage_adapter='chatterbot.storage.SQLStorageAdapter', #collect database
logic_adapters=[
'chatterbot.logic.MathematicalEvaluation',
'chatterbot.logic.TimeLogicAdapter'
'chatterbot.logic.BestMatch'],
database_uri='sqlite:///database.db')
print('Ask something!!')
while True:
try:
user_input = input()
bot_response = bot.get_response(user_input)
print(bot_response)
except (KeyboardInterrupt, EOFError, SystemExit):
break

answered

Most helpful comment

you do not have 'en' downloaded use python -m spacy download en. tell me if that works

All 8 comments

Screenshot (21)

That's happening because spacy isn't loading correctly. you need to link whatever spacy model you have installed to the name en.

For example, if you have en_core_web_sm installed:

python -m spacy link en_core_web_sm en

'python -m spacy link spacy-2.3.2.dist-info en ' is showing syntax error

you do not have 'en' downloaded use python -m spacy download en. tell me if that works

their is no module name spacy . @mike2222222222

Are you windows 10?

This could be because your virtual env does not have the permissions to create the symbolic link

Open up CMD as administrator and create your link (something similar to below)
mklink /d E:\MyProjects\ChatBot\venv\Lib\site-packages\spacy\data\en E:\MyProjects\ChatBot\venv\Lib\site-packages\en_core_web_sm

or like the error says their is no module name spacy you may not have spacy installed have you installed it using pip install spacy?

yes @mike2222222222

Was this page helpful?
0 / 5 - 0 ratings

Related issues

atulanandnitt picture atulanandnitt  路  3Comments

vkosuri picture vkosuri  路  4Comments

gunthercox picture gunthercox  路  3Comments

decode007 picture decode007  路  4Comments

decode007 picture decode007  路  3Comments