I was able to find the source of the problem. My application began with a
"greeting" consisting of an image embedded on a figure canvas. In my spec
file I had included the path to the image in datas.

However, when double-clicking on the application, it appears that such
information alone is not sufficient to ensure the bundled application can
find the image at launch. A minor adjustment can be made, which is outlined
by @ArmindoFlores and can be found at

https://stackoverflow.com/questions/51264169/pyinstaller-add-folder-with-images-in-exe-file

With regard to Steve's comment, my understanding is that Apple notarization
will be required if I want anyone with Catalina or newer to be able to use
it.

Thanks all for your responses.

Paul

On Thu, Jun 24, 2021 at 1:11 PM Israel Brewster <[email protected]>
wrote:

> I want to say I’ve run into this before, but it was simply an issue of
> what directory I was in when running the app from the terminal. That is, it
> worked when I ran it in the terminal *because* of the directory I was in
> when I ran it - when I changed to a different directory, such as the one
> the application was actually in, I got errors that I was then able to fix.
> It’s been a while since I dealt with it, however, and it was definitely pre
> Big Sur, so I can’t say for sure. I’ll have to check things on Big Sur.
>
> ---
> Israel Brewster
> Software Engineer
> Alaska Volcano Observatory
> Geophysical Institute - UAF
> 2156 Koyukuk Drive
> Fairbanks AK 99775-7320
> Work: 907-474-5172
> cell:  907-328-9145
>
> On Jun 24, 2021, at 6:44 AM, Steve Barnes <[email protected]> wrote:
>
> Thor,
>
> I am not a Mac user so can be of very little help but I recall there being
> reports of issues with running locally bundled applications due to the fact
> that the application was not signed by Macintosh App Store. I think that it
> might depend on one of the installation path &/or the launch method.
> Possibly some googling on these lines could help.
>
> Steve Barnes
>
> *From:* [email protected] <[email protected]> *On
> Behalf Of *Tepper
> *Sent:* 24 June 2021 07:38
> *To:* [email protected]
> *Subject:* Re: [PyInstaller] Created Mac app works at terminal but not
> won't launch upon double-click
>
> Hi Paul,
>
> I’ve been dealing with the same issue for a long time now, still without
> a solution. It seems as if there are not many Mac users on this forum,
> or Mac users that make use of PyInstaller, which truly puzzles me.
>
> Anyways, if you happen to come across a solution I’d be grateful if
> you could share it, and vice versa.
>
> Cheers
>
> Thor
>
> ____________________________
> Dr. Thor Tepper García
> Astrophysicist
> www.thorsten.mx
> <https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.thorsten.mx%2F&data=04%7C01%7C%7C18aed9c5b63c40b9842708d93714ea96%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637601385434242863%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=e5ek%2FAg2JAwV3MzdIb4VHyT5AFd%2BnjVs5V7a4Fcp8Y4%3D&reserved=0>
> @thorsten_mx
>
>
> On 24 Jun 2021, at 01:38, Paul Fishback <[email protected]> wrote:
>
> Running Mac Big Sur with Python 3.9 and the most recent pyinstaller.
>
> My app, whose GUI utilizes tkinter, works fine at the terminal. However,
> when I double-click on the app, the icon briefly appears on the computer
> dock before disappearing.
>
> Below is my spec file.
>
> Thanks.
>
> Paul
>
> *************************************
>
> block_cipher = None
>
> a = Analysis(['Sample_Application.py'],
>
>  
> pathex=['/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages',
> '/Users/fishbacp/Desktop'],
>              binaries=[],
>              datas=[('/Users/fishbacp/Desktop//background.png','.')],
>              hiddenimports=['_tkinter','PIL'],
>              hookspath=[],
>              runtime_hooks=[],
>              excludes=[],
>              win_no_prefer_redirects=False,
>              win_private_assemblies=False,
>              cipher=block_cipher,
>              noarchive=False)
> pyz = PYZ(a.pure, a.zipped_data,
>              cipher=block_cipher)
> exe = EXE(pyz,
>           a.scripts,
>           [],
>           exclude_binaries=True,
>           name='Sample_Application',
>           debug=False,
>           bootloader_ignore_signals=False,
>           strip=False,
>           upx=True,
>           console=False )
> coll = COLLECT(exe,
>                a.binaries,
>                a.zipfiles,
>                a.datas,
>                strip=False,
>                upx=True,
>                upx_exclude=[],
>                name='Sample_Application')
> #exe
> app =
> BUNDLE(coll,name='Sample_Application.app',icon='/Users/fishbacp/Desktop/spectrum.ico',bundle_identifier=None,
> info_plist={
>         'LSEnvironment': {
>             'LANG': 'de_DE.UTF-8',
>             'LC_CTYPE': 'de_DE.UTF-8'
>         }})
>
> --
> You received this message because you are subscribed to the Google Groups
> "PyInstaller" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pyinstaller/d86d5fc1-60f5-4608-a3a5-b31da9c2ffd1n%40googlegroups.com
> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpyinstaller%2Fd86d5fc1-60f5-4608-a3a5-b31da9c2ffd1n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7C%7C18aed9c5b63c40b9842708d93714ea96%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637601385434252817%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2F%2Fnxh5fRhDs0nvyd3hBQGdnuUie2R7pT3uhvio%2FxClg%3D&reserved=0>
> .
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "PyInstaller" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pyinstaller/9ED2DEAD-B8C7-4349-9AB0-1D2B4C8DE49D%40gmail.com
> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpyinstaller%2F9ED2DEAD-B8C7-4349-9AB0-1D2B4C8DE49D%2540gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7C%7C18aed9c5b63c40b9842708d93714ea96%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637601385434252817%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3dVJyWdkiNg97KGQxPnlexPPr6xLBxW5zDNvw3bOPmQ%3D&reserved=0>
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "PyInstaller" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pyinstaller/VI1PR03MB6575403FA3EC6D4CB56E9C359B079%40VI1PR03MB6575.eurprd03.prod.outlook.com
> <https://groups.google.com/d/msgid/pyinstaller/VI1PR03MB6575403FA3EC6D4CB56E9C359B079%40VI1PR03MB6575.eurprd03.prod.outlook.com?utm_medium=email&utm_source=footer>
> .
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "PyInstaller" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/pyinstaller/2L0IcUzRyW8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pyinstaller/443326B5-AFB9-49B8-A3E9-BF5688978803%40alaska.edu
> <https://groups.google.com/d/msgid/pyinstaller/443326B5-AFB9-49B8-A3E9-BF5688978803%40alaska.edu?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/CACWiRmmGtPMQZqVsswiEjvR0PJwqaA5VtnKehtbST%2BL%3DnJLcQQ%40mail.gmail.com.

Reply via email to