OSX 10 11 with py2app

0 votes

I'm trying to build a standalone osx app with py2app that runs a gui I wrote. Since I wasn't able to do so I decided to check whether I was able to build a standalone osx app at all (a really basic one).

Everything seems to go right until i try to run my app in alias mode like this:

$ ./dist/Sandwich.app/Contents/MacOS/Sandwich

I get the following message saying:

$ ./dist/Sandwich.app/Contents/MacOS/Sandwich
Dec 28 01:48:51  Sandwich[48299] <Notice>: Traceback (most recent call 
last):
Dec 28 01:48:51  Sandwich[48299] <Notice>:   File 
"/Users/username/Sandwich/dist/Sandwich.app/Contents/Resources/__boot__.py", line 376, in <module>
Dec 28 01:48:51  Sandwich[48299] <Notice>:     _run()
Dec 28 01:48:51  Sandwich[48299] <Notice> File"
/Users/username/Sandwich/dist/Sandwich.app/Contents/Resources/__boot__.py", line 361, in _run
Dec 28 01:48:51  Sandwich[48299] <Notice>:     with open(script, 'rU') as fp:
Dec 28 01:48:51  Sandwich[48299] <Notice>: IOError: [Errno 2] No such file or directory: '/Users/username/Sandwich/Sandwich.py'
Dec 28 01:48:51  Sandwich[48299] <Notice>: 2016-12-28 01:48:51.258 Sandwich[48299:2126424] Sandwich Error

Q: What do I need to do in order to succesfully create a OSX standalone app from here? The documentation on py2app is quite minimalistic and I can't find anyone with the same problem.

I would really appreciate the help! I've been trying to build an osx standalone app for a week now. Thanks in advance!

Sep 6, 2018 in Python by bug_seeker
• 15,510 points
893 views

1 answer to this question.

0 votes

Try this:

In the directory of Sandwich.py (or whatever code you are using), type this:

    py2applet --make-setup Sandwich.py

Then, in that directory, you will find a setup.py file, which you can customize with an icon, etc. Once you are satisfied with the setup.py file, run this command to build the app:

    python setup.py py2app -A

I hope that helps!

answered Sep 6, 2018 by Priyaj
• 58,020 points

Related Questions In Python

0 votes
1 answer

OSX 10.11 with py2app?

I'm not sure if this is your ...READ MORE

answered May 9, 2018 in Python by charlie_brown
• 7,720 points
1,431 views
+2 votes
10 answers

How to fix this? ValueError: invalid literal for int() with base 10 error in Python

The following are totally acceptable in python: passing ...READ MORE

answered Nov 16, 2018 in Python by Nymeria
• 3,560 points
409,221 views
0 votes
1 answer

Error is "invalid literal for int() with base 10: ' ' "

This error is caused because we try ...READ MORE

answered Oct 15, 2020 in Python by Gitika
• 65,770 points
2,890 views
0 votes
1 answer

invalid literal for int() with base 10 in python

Hello, You can try this simple code: def getSum(n): ...READ MORE

answered Nov 23, 2020 in Python by Niroj
• 82,840 points
2,085 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,434 views
0 votes
1 answer
+1 vote
1 answer

How to replace id with attribute corresponding to id of another table?

Use the following query statement and let ...READ MORE

answered Aug 8, 2018 in Python by Priyaj
• 58,020 points
2,476 views
+1 vote
1 answer

Understanding Python super() with __init__() methods

It's been noted that in Python 3.0+ ...READ MORE

answered Aug 28, 2018 in Python by Priyaj
• 58,020 points
4,127 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP