ERROR STARTING . EXE PYTHON

Asked

Viewed 75 times

-5

Hello, I’m creating a chatbot in Python using the Chatterbot library, so I tried to turn my simple Python code into a file. exe so other people can test, I’m using pyinstaller.

I installed it by command prompt: pip install pyinstaller then I enter the folder that is my code by cmd, and type: pyinstaller [filename.py], and it runs all right, compiles all the files, but the problem is when I run the file . exe, that it shows this error. And I would like help to resolve this. Como este

This is my code


from chatterbot.trainers import ListTrainer
from chatterbot import ChatBot

bot = ChatBot('Aiby')
bot.set_trainer(ListTrainer)

Train = ['Oi', 'Olá','Como vai?', 'Vou bem e você?', 'Vou bem também!']

bot.train(Train)


while True:
    ask = input('Você: ')                       
    answer = bot.get_response(ask)
    if float(answer.confidence) > 0.0:
        print('Aiby: ', answer)
    else:
                print("Aiby: Acho que não sei como responder a isso, me desculpe!")

If you need more details you can comment below, I will be willing to help you help me!!! Thank you in advance!

1 answer

0

Friend you can try before you create the program, create a folder called "Lib" in the root folder of your project and drag the libraries that your program uses inside. the libraries in windows are in the following directory

"H: Users your user Appdata Local Programs Python Python38-32 Lib site-Packages

in the "H" yours may be different, so you can switch to the letter of your partition and in the user you put the name of your user.

Browser other questions tagged

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