Error using chatterbot in python ('chatterbot' is not a package)

Asked

Viewed 644 times

-1

I made a basic code of Chatterbot in Python that ran well, but suddenly stopped working and always presents the same error:

from chatterbot.trainers import Listtrainer Modulenotfounderror: No module named 'chatterbot.trainers'; 'chatterbot' is not a package

Please, can someone help me?

  • He didn’t find the package chatterbot. Make sure that it is installed and that you are running Python in the same version as the package was installed.

1 answer

1


That problem has already been reported and resolved in Stackoverflow in English.

This may be caused by the fact that this file you are running, or some other file that is in the same directory, has the same name as the module. In this way, it will cause this error, because, as stated in the statement: 'chatterbot' is not a package.

In short: change the file name of "chatterbot" for another name.

However, if this doesn’t stop the bugs regarding the module then, as @Woss said, you should make sure you have the chatterbot installed.

I hope I’ve helped!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.