-2

I have created a python tkinter data entry tool. I run PyInstaller on my mac and succesfully get a .app file that runs perfectly fine on my mac. When I put it in a box folder for my friend to use on his mac, he gets "You can't open the application "xxx" because this application is not supported on this mac. I am using a newer M1 mac and he is using an older one (2020 i think), not sure if that matters. I tried creating a dmg image and sharing that through the box drive. He can succesfully download the dmg, but when he tries to open it or drag it to his desktop he gets the same error. Would a .pkg work and if so how do I create one? Any other advice or help, I would be incredibly grateful for.

Tried sharing it in .app and .dmg form, expecting him being able to download it and neither worked.

  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Aug 30 '23 at 02:57

1 Answers1

0

Your m1 mac uses an arm processor. The older mac uses an x86_64 Intel processor. An app cannot be executed on an arm and x86_64 system, you need two versions, one for arm and one for Intel. But there is one exception: universal2 apps include binaries for both architectures, so the same app can be executed on arm and Intel systems.

When you run pyinstaller on your m1 mac, it defaults to build an app for your system, not for an Intel system.

I don't have a mac around right now, so I can't test my solution, but you can give it a try. According to the PyInstaller documentation, you can run the following command to build an universal2 app (don't forget to change "myscript.py" to the name of your python file):

pyinstaller --target-architecture universal2 myscript.py 

If this does not work, you can also try building a x86_64 app with following command:

pyinstaller --target-architecture x86_64 myscript.py 

Since your m1 mac can use the rosetta emulator to execute apps build for Intel macs, you should also be able to run this app on your mac.

mgaus
  • 1
  • 2