I’m having trouble creating a Chatbot in Python

Asked

Viewed 448 times

0

from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer

chatbot = ChatBot('HiAsda')

#Cria um novo treinador para o bot
trainer = ChatterBotCorpusTrainer(chatbot)

#Treina o chatbot baseado no corpus
trainer.train("chatterbot.corpus.portuguese.greetings")
#obtem uma resposta a uma declaração de entrada
chatbot.get_response("Olá, como você está? ")

Returns

"C:\Users\Familia Pantoja\chatterbot01\venv\Scripts\python.exe" "C:/Users/Familia Pantoja/chatterbot01/Programa/__init__.py"
Traceback (most recent call last):
  File "C:/Users/Familia Pantoja/chatterbot01/Programa/__init__.py", line 1, in <module>
    from chatterbot import ChatBot
  File "C:\Users\Familia Pantoja\chatterbot01\venv\lib\site-packages\chatterbot\__init__.py", line 4, in <module>
    from .chatterbot import ChatBot
  File "C:\Users\Familia Pantoja\chatterbot01\venv\lib\site-packages\chatterbot\chatterbot.py", line 2, in <module>
    from chatterbot.storage import StorageAdapter
  File "C:\Users\Familia Pantoja\chatterbot01\venv\lib\site-packages\chatterbot\storage\__init__.py", line 1, in <module>
    from chatterbot.storage.storage_adapter import StorageAdapter
  File "C:\Users\Familia Pantoja\chatterbot01\venv\lib\site-packages\chatterbot\storage\storage_adapter.py", line 3, in <module>
    from chatterbot.tagging import PosHypernymTagger
  File "C:\Users\Familia Pantoja\chatterbot01\venv\lib\site-packages\chatterbot\tagging.py", line 4, in <module>
    from chatterbot.tokenizers import get_sentence_tokenizer
  File "C:\Users\Familia Pantoja\chatterbot01\venv\lib\site-packages\chatterbot\tokenizers.py", line 4, in <module>
    from chatterbot.corpus import load_corpus, list_corpus_files
  File "C:\Users\Familia Pantoja\chatterbot01\venv\lib\site-packages\chatterbot\corpus.py", line 5, in <module>
    from chatterbot_corpus.corpus import DATA_DIRECTORY
ModuleNotFoundError: No module named 'chatterbot_corpus'

Process finished with exit code 1

Can you guide me? I’m new to programming and new to python

  • The application depends on a module that is not installed. Modulenotfounderror: No module named 'chatterbot_corpus'. Just install it.

1 answer

1

Hello! I’m also new to python, I’m doing a "course" to create a chatbot and use it in Whatsapp... ...well, I also got this same mistake and looking around, surround this command inside the folder where Anaconda3 is installed

Conda Uninstall Pyyaml

several packages have been updated and some have also been removed. Finished the process, I ran the command

Pip install chatterbot_corpus

It was installed, but this requesting new packages in which I am installing.

In short, with the command of the "Conda Uninstall" I managed to downgrade the Pyyaml and with it follow the "burial"...

I hope it works for you. Hugs and success in the project!

Browser other questions tagged

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