This is a common problem, though the solutions seem diverse and none have helped me.
Like this question and this question, on mac, my PyInstaller .app fails to open when clicked on in Finder. However it does work when launched from the terminal ./helloWorldTest.app/Contents/MacOS/helloWorldTest.
The .exe
file does works when clicked on in Finder (which from my reading also seems common).
Unlike the apps in the linked questions, my app does not read or write any files: I have entirely gutted my actual app (which has the same problematic behaviour) to a simple hello world
version:
# This is a trivial app with a loop to ensure it stays open long enough to actually see something happen before the script finishes.
print('hello world!')
i = 0
while i < 1000000:
print('hello world number: ', i)
i += 1
While >90% of the solutions to similar sounding problems all involve changing paths, that can't be the issue here as there is essentially nothing to this app. So, can anyone help me get this basic app working so I can build & debug from there?
Here is the PyInstaller command I use: pyinstaller helloWorldTest.py --onefile --icon=dipyIcon.icns -w --clean