2

When I run the .exe from my project folder from terminal with dist\app\app.exe it runs fine, I can see my output in terminal etc.

However, with double-clicking the .exe I just get a flashing terminal window.

Does anyone have an idea or a clue?

sophros
  • 14,672
  • 11
  • 46
  • 75
Marro
  • 73
  • 8

2 Answers2

2

By inspiration of the following post: PyInstaller .exe file does nothing I tried using --noupx in my installer command, and this lets me app run by double-clicking while having a terminal window on the background (which I am fine with for now).

Marro
  • 73
  • 8
0

When double-clicking you are going to run your application and it will close immediately after completion. The only exception is if the application is going to ask for input. This means that your application most likely runs fine.

It is also possible that you opened cmd-line as Administrator and thanks the application runs fine but when you double-click it is not being executed because it lacks access. It is not possible to tell without a closer investigation though.

sophros
  • 14,672
  • 11
  • 46
  • 75
  • Sorry for my lack of information, I was hoping for general advice first so I can delve into the problem deeper myself! My app runs a tkinter GUI, so in this case I knew it should not have stopped abruptly. I was also checking administrator access based on the Visual Studio Code terminal I was running and to run the .exe as Admin, which did not help yet. However for now I will use the `--noupx` flag and try more to also remove the terminal window from the background, to have that option available to me. Thanks for reaching out! – Marro Dec 21 '20 at 13:20
  • On a sidenote, is it good practise to delete my question from SO now as it seems basic, or wait 2 days and accept my own answer? – Marro Dec 21 '20 at 13:23