3

I'm trying to create a GUI Python app using Py2App, but am having trouble running the setup script py2applet.

I've installed py2app via pip

$ sudo pip install py2app #this works ok

Then, I try to build the setup script:

$ py2applet --make-setup gui.py #this fails w/ no command found

What am I doing wrong?

jshawl
  • 3,315
  • 2
  • 22
  • 34

5 Answers5

6

Try refreshing your shells' memory or try to call the app with full path just to see if that works. E.g. /usr/bin/py2applet

You can use

sudo find / -name "py2applet" -type f

To find the location if you don't know.

Eg bash would have the hash -r command to refresh itself. http://ss64.com/bash/hash.html

Harald Brinkhof
  • 4,375
  • 1
  • 22
  • 32
3

Find the executable:

sudo find / -name "py2applet" -type f

Then add its parent directory to your PATH environment variable:

export PATH=$PATH:YOUR_PATH_HERE
Chris Villa
  • 3,901
  • 1
  • 18
  • 10
1

I found the commands in:

Python 2.7

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/bin/py2applet

Python 3.7

/Users/development/Library/Python/3.7/bin/py2applet
raw-bin hood
  • 5,839
  • 6
  • 31
  • 45
0

Btw in normal operation it should be in /usr/local/bin/

-rwxr-xr-x  1 admin  admin  296 21 Apr  2015 /usr/local/bin/py2applet
loretoparisi
  • 15,724
  • 11
  • 102
  • 146
0

This worked for me on Mac OS X:

$ sudo pip install py2app

After installing py2app using pip:

$ python /Users/user/site-packages/py2app/script_py2applet.py --make-setup MyApplication.py

This works as well as using the py2applet command. If the py2app folder was installed elsewhere, be sure to include the full directory.

underpig
  • 3
  • 1
  • 3