Python macOS builds run from Terminal but crash on Finder launch
General issue with running an app from the Finder
#1804 seems to be a more general issue with macOS and Python app bundles, regardless of macOS version, the use of Tkinter (#3820) or even pyinstaller itself. Has there been any progress on this issue lately?
To summarise, Python macOS builds (either from pyinstaller or py2app) run just fine from Terminal but crash when launched from the Finder with a double-click on the app icon.
I've added some debug information below. However, as I've said this issue is not directly related to pyinstaller (although it's discussed in several of its issues pages). This is a larger problem. On my end I didn't even succeed building the app once with pyinstaller (I may be doing something wrong), although py2app packaged it without issues. If you follow some SO posts from the link above, some people suggest either one when the other fails.
This, again, seems to confirm that what I describe is not a pyinstaller issue. Complete details are here. I am merely asking if any progress has been made in the last years. Thank you.
Context
- pyinstaller version output: 4.0
- Python version: 3.8.5
- Platform: macOS Catalina 10.15.6 (only platform tested)
- Tried also after installing latest dev build "4.1.dev0"
On execution, pyinstaller write around 20 "missing module" messages in the "warn-app.txt" file. I don't have a clue as to what they are because I didn't import them anywhere. Aside from importing my own files (2 of them), the only imports I have are:
from collections import Counter
import yaml
import os
import tkinter as tk
from tkinter import ttk
from webbrowser import open as webopenNone of them are listed in warn-app.text except for yaml (which, again, is not the issue here, see below):
missing module named _yaml - imported by yaml.cyaml (top-level)
Then pyinstaller displays several dozens of those, apparently not importing Tkinter:
WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/*
It then ends with this:
INFO: Building COLLECT COLLECT-00.toc completed successfully.
Source: pyinstaller/pyinstaller