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).

So I used this tutorial: https://www.metachris.com/2015/11/create-standalone-mac-os-x-applications-with-python-and-py2app/

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!

May 9, 2018 in Python by ariaholic
• 7,340 points
252 views

1 answer to this question.

0 votes

I'm not sure if this is your problem, but I had a similar issue which I managed to fix by doing the following:

Py2app: Operation not permitted

followed by running

python3 setup.py py2app

. I'm not much of an expert, but with those two steps I just managed to get my own GUI app working.

Additionally, if you still encounter errors, you may want to try building a non-alias version (just exclude the -A flag), and running the app that is generated in /dist. It will probably error - there is an option to see the error in terminal, which may give you a hint as to what exactly is going wrong.

answered May 9, 2018 by charlie_brown
• 7,720 points

Related Questions In Python

0 votes
1 answer

OSX 10.11 with py2app?

Try this: In the directory of Sandwich.py (or ...READ MORE

answered Sep 6, 2018 in Python by Priyaj
• 56,960 points
118 views
0 votes
1 answer

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,520 points
24,316 views
+2 votes
2 answers

How can I replace values with 'none' in a dataframe using pandas

Actually in later versions of pandas this ...READ MORE

answered Aug 13, 2018 in Python by bug_seeker
• 15,360 points
8,406 views
0 votes
1 answer

Need help writing a dataframe into a csv with the help of a loop

Using the following logic you can arrive ...READ MORE

answered Apr 17, 2018 in Python by anonymous
1,151 views
0 votes
1 answer

Need help with searching a binary search tree

Instead of multiplying the number of nodes ...READ MORE

answered Apr 17, 2018 in Python by anonymous
45 views
0 votes
1 answer

How to perform web scraping with python?

Hey, there are various libraries used in ...READ MORE

answered Apr 20, 2018 in Python by aayushi
• 750 points
328 views
+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
• 56,960 points
44 views
0 votes
1 answer

Create an empty list in python with certain size

Try this instead: lst = [None] * 10 The ...READ MORE

answered Aug 2, 2018 in Python by bug_seeker
• 15,360 points
1,247 views
+1 vote
2 answers

Measuring the distance between pixels on OpenCv with Python

You can try this: Mat pts1(nPts, 1, CV_8UC2), ...READ MORE

answered Aug 24, 2018 in Python by Omkar
• 68,180 points
3,573 views
0 votes
1 answer

Numpy: Multiplying large arrays with dtype=int8 is SLOW

Unfortunately, the "engine" behind the scenes is BLAS, ...READ MORE

answered May 9, 2018 in Python by charlie_brown
• 7,720 points
84 views