py2app built app displays `ERROR: pygame.macosx import FAILED` on other machines

后端 未结 2 1369
误落风尘
误落风尘 2021-02-03 15:56

Trying to build an app on the Mac using py2app. Got everything working fine on my machine, but when moving the app to another, it crashes and the console displays this error.

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-03 16:31

    Thank you for posting what you found!

    I had a similar problem. I tried various combinations of what you suggested, and isolated the single issue for me to be the bug in boot_app.py which you identify above.

    Once I added the one-line fix to boot_app.py which you identify above, everything worked, even using the pre-installed Apple build of python (version 2.6.1).

    I should note that when I say "everything worked," I really mean building a py2app app for actual distribution, i.e. using the normal command:

    python setup.py py2app
    

    The "alias" mode. i.e.

    python setup.py py2app -A
    

    which the py2app documentation suggests for use during development, still does not work for me (with the same module not found error). But better the actual distribution build working than nothing at all! Again, thanks.

提交回复
热议问题