Okay, so, I was finishing my project and I wanted to convert all the files to .app. I typed python main_gui.py py2app
into the terminal (I already made my way to the folder with the file using cd
command).
But, instead of building the app, nothing happed. When I tried to close terminal to try again, it warned me that I'll kill an existing process. Tried same thing with just python main_gui.py build
, nothing changed. Is Terminal freaking out or I am freaking out?
Asked
Active
Viewed 438 times
0

mcarton
- 27,633
- 5
- 85
- 95

The Developer
- 41
- 2
1 Answers
0
Py2app official documentation: https://py2app.readthedocs.io/en/latest/tutorial.html#building-for-deployment
Building a redistributable application consists of simply running the py2app command:
$ python setup.py py2app
So you need to have a setup.py
file. For what I see, you are not passing that argument into such file. To generate a setup.py
, the docs say:
Create a setup.py file The first step is to create a setup.py file for your script. setup.py is the “project file” that tells setuptools
everything it needs to know to build your application. We’ll use the py2applet script to do that:
$ py2applet --make-setup MyApplication.py
-
I found a similar instructions [here](https://www.metachris.com/2015/11/create-standalone-mac-os-x-applications-with-python-and-py2app/), but when I typed `py2applet --make-setup main_gui.py` it said that command "py2applet" doesn't exist. I decided to make setup.py by myself, could it be the problem? – The Developer Aug 26 '18 at 08:39
-
If the command does not exist it means you have misconfigured something. – Aug 26 '18 at 09:29
-
@TheDeveloper please check https://stackoverflow.com/questions/11064657/py2applet-command-not-found You have to create the file with the indicated tools, unless you actually know very well what you are doing by creating it yourself. That is most likely the cause of your error – Aug 27 '18 at 15:25
-
Also if the error still persists please indicate so in this comment section – Aug 27 '18 at 15:26