Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is PyGTK for Mac OS X?

Tags:

macos

pygtk

Is there a binary out there for the current mac os x, python for PyGTK? I work with multiple desktop environments (mac, windows, gnome) and really consider python's lack of cross platform GUI's a problem. Does anyone know where I can find a built version of PyGTK and GTK for Mac? I cant clone the git repository, it keeps timing out.

like image 660
Ronaldo Nascimento Avatar asked Jul 22 '09 12:07

Ronaldo Nascimento


3 Answers

brew install pygtk worked for me (requires homebrew).

Confirmed to work with OS X 10.10 too, but by default it will install it into brew's Python distribution, so if you are still using the native python, it will not find it.

like image 98
chelmertz Avatar answered Nov 15 '22 20:11

chelmertz


I don't use macports but it seems that jhbuild works for me. Below is the steps that I've done.

  1. download gtk-osx-build-setup.sh from: https://raw.github.com/jralls/gtk-osx-build/master/gtk-osx-build-setup.sh and save it to your home directory.
  2. fire up terminal and navigate to your home directory and run the command sh gtk-osx-build-setup.sh
  3. the shell script will warn you that ~/.local/bin isn't added to your environment variable to do this, edit your .profile file located at your home directory and /Users/<username>/.local/bin to your environment variable. to know more on how to edit this file check out: http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/
  4. after that, do a ~/.local/bin/jhbuild bootstrap command. it will download and install some necessary utilities.
  5. download and install the beta version of the gtk+ osx framework at: http://ftp.imendio.com/pub/imendio/gtk-osx/Gtk-Framework-2.14-LATEST.dmg
  6. before installing the meta-gtk-osx-python, you need to build and install some other packages that jhbuild doesn't install automatically, so what i did was i installed libpng by doing the command: ~/.local/bin/jhbuild build libpng
  7. you also need to install libtiff so do the command: ~/.local/bin/jhbuild build libtiff
  8. and also gtk-doc is needed so: ~/.local/bin/jhbuild build gtk-doc
  9. and finally you can now install meta-gtk-osx-python by doing a: ~/.local/bin/jhbuild build meta-gtk-osx-python

Let me know if it works.

like image 35
b3rx Avatar answered Nov 15 '22 20:11

b3rx


There is an installer for PyGTK 2.24 in test here, announced on the PyGTK list.

UPDATE project has moved on macpkg's sourceforge page.

I couldn't make it work with meld (segmentation fault), but sample PyGTK programs work OK.

UPDATE 2 since then a new package Py3GTK3 appeared on the same sourceforge page. Haven't tested though.

like image 11
CharlesB Avatar answered Nov 15 '22 22:11

CharlesB