Command prompt closing too quickly

4.9k Views Asked by At

I know there are lots of questions on this topic, however none so far is the result of a pyinstaller package.

I used pyinstaller to package a python file. It runs well before packaging, but when I open the exe, it briefly displays an error and closes before I get the chance to read.

How can I stop the command prompt from doing so, or how else can I view this log?

2

There are 2 best solutions below

1
On BEST ANSWER

Manually open a command prompt (Start > Run > cmd), navigate to the folder containing your program (cd C:/Users/Ladmerc/python_programs), and then run the program (my_program.exe). The terminal window will stay open after the program exits.

0
On

You can always open the command line and then run the executable from there. I'm sure there are other ways, but this is the first that I thought of. Here's a link that may be helpful.