cannot properly import the chatterbot and its corpus

Balaji bala picture Balaji bala · May 21, 2018 · Viewed 8.8k times · Source

I have used:

|
+ -  lib
|     |
|     + - chatterbot
|     |
|     + - chatterbot_corpus
+ -  main.py

I am getting this error:

Traceback (most recent call last):
  File "main.py", line 1, in <module>
    from lib.chatterbot.chatterbot import ChatBot
  File "D:\Workspace\PYTHON\phraser\lib\chatterbot\chatterbot\__init__.py", line 4, in <module>
    from .chatterbot import ChatBot
  File "D:\Workspace\PYTHON\phraser\lib\chatterbot\chatterbot\chatterbot.py", line 3, in <module>
    from .storage import StorageAdapter
  File "D:\Workspace\PYTHON\phraser\lib\chatterbot\chatterbot\storage\__init__.py", line 2, in <module>
    from .django_storage import DjangoStorageAdapter
  File "D:\Workspace\PYTHON\phraser\lib\chatterbot\chatterbot\storage\django_storage.py", line 1, in <module>
    from chatterbot.storage import StorageAdapter
ModuleNotFoundError: No module named 'chatterbot'

How can I solve this?

I don't want to install the module in python.

Answer

K Arun Singh picture K Arun Singh · Apr 5, 2019

For error, No module named 'chatterbot' install chatterbot by running

pip install chatterbot

For more info click PyPi

For error, No module named 'chatterbot_corpus' install chatterbot_corpus by running

pip install chatterbot-corpus

For more info click PyPi