3

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.

jps
  • 20,041
  • 15
  • 75
  • 79
Balaji bala
  • 31
  • 1
  • 1
  • 2

6 Answers6

5

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

K Arun Singh
  • 2,629
  • 3
  • 20
  • 34
2

do this first

pip install --ignore-installed PyYAML

then do this

pip install chatterbot_corpus

for devs on windows

1

try to install throw pip install docs

pip install chatterbot 

create a new python file module, for example main.py, and import chatterbot, example docs

from chatterbot import ChatBot

i run this and it works, try

Druta Ruslan
  • 7,171
  • 2
  • 28
  • 38
1

for chatterbot install on ubuntu python3

pip3 install chatterbot

pip3 install chatterbot-corpus

Community
  • 1
  • 1
injamaul
  • 11
  • 2
1

The solution is:

pip install --user chatterbot
Ophir Carmi
  • 2,701
  • 1
  • 23
  • 42
0

To install chatterbot you can simply fire the command.

pip install chatterbot

After installing chatterbot you should install chatterbot-coprus.

pip install chatterbot-coprus

If above command does not work. Then try bellow. I did struggle a lot. I tried with python 3.7 and 3.6 , I was facing the same issue. finally i manually download and pasted in the C:\Python\python36\Lib\site-packages and it worked . make sure you put your python path correctly.

Varun
  • 4,342
  • 19
  • 84
  • 119