Python. Creating an app for mac os using pyinstaller

Hello everyone

I ran into the following problem: A simple window application was written using the PySide2 library.

enter a description of the image here

From this project, I create an executable file .app using pyinstaller by writing the command: enter a description of the image here

After that, the application itself is created(3 folders and a file are highlighted in the image below)

enter a description of the image here

The dist folder contains the Main.app application itself, it works and looks like everything would be fine.

enter a description of the image here

And now we come to the problem. If I want to send my app to someone, it doesn't work. Even if I send the entire project folder (even to myself), the file still doesn't run. At the same time, when you transfer the project, the Unix executable file 'Main' turns into a text document:

enter a description of the image here

Maybe someone faced this problem, knows the solution? How to make an app on mac os from python code, which can be passed on to other people?

Author: Sergey Goolchak, 2020-05-05