ChatterBot: Not able to import chatterbot after successful installation
code :
from chatterbot import ChatBot
chatbot = ChatBot(
'Ron Obvious',
trainer='chatterbot.trainers.ChatterBotCorpusTrainer'
)
chatbot.train("chatterbot.corpus.english")
chatbot.get_response("Hello, how are you today?")
error :
python test.py
Traceback (most recent call last):
File "test.py", line 1, in <module>
from chatterbot import ChatBot
ImportError: No module named chatterbot
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 40 (3 by maintainers)
hi l am getting this error after trying to run my chatbot, l installed chatterbot and chatterbot-corpuse successfully Traceback (most recent call last): File “C:\Users\Dell\AppData\Local\Programs\Python\Python36-32\chatbot 2.0\chatbot 2.0.py”, line 1, in <module> from chatterbot import ChatBot File “C:\Users\Dell\AppData\Local\Programs\Python\Python36-32\lib\site-packages\chatterbot_init_.py”, line 4, in <module> from .chatterbot import ChatBot File “C:\Users\Dell\AppData\Local\Programs\Python\Python36-32\lib\site-packages\chatterbot\chatterbot.py”, line 2, in <module> from chatterbot.storage import StorageAdapter File “C:\Users\Dell\AppData\Local\Programs\Python\Python36-32\lib\site-packages\chatterbot\storage_init_.py”, line 1, in <module> from chatterbot.storage.storage_adapter import StorageAdapter File “C:\Users\Dell\AppData\Local\Programs\Python\Python36-32\lib\site-packages\chatterbot\storage\storage_adapter.py”, line 3, in <module> from chatterbot.tagging import PosLemmaTagger File “C:\Users\Dell\AppData\Local\Programs\Python\Python36-32\lib\site-packages\chatterbot\tagging.py”, line 3, in <module> import spacy ModuleNotFoundError: No module named ‘spacy’
It works now .Thank you very very much FinchZ 🥇 . Have a wonderful Day
pip install pytz --user
i am not sure if the developer forgets to add it to requirements.txt
No problem, it happens ¯_(ツ)_/¯
I just had to put “sudo” in front and then download it and then on the pycharm he told me to update
Reinstall chatterbot and see if you are getting any error. In my case , I was getting below error: Installing collected packages: pyYAML Found existing installation: PyYAML 3.12 ERROR: Cannot uninstall ‘PyYAML’. It is a distutils installed project and thus w e cannot accurately determine which files belong to it which would lead to only a partial uninstall. I searched for all pyYAML files and removed manually. then reinstalled and got below message. Installing collected packages: pyyaml, mathparse, chatterbot Successfully installed chatterbot-1.0.5 mathparse-0.1.2 pyyaml-5.1.2
Now I can successfully import it.
my god~~i am so sorry , i made a stupid mistake, after i download the “ChatterBot-master” from git, i used this folder directly.Instead, i should copy the subfolder"chatterbot" in “ChatterBot-master” .
Can you import any python packages that have been installed? I’m wondering if this isn’t an issue that is specific to ChatterBot.
For example, if you run:
and then try to import it: