How to install it?
This FAQ looks outdated:
http://faq.pygtk.org/index.py?req=show&file=faq01.019.htp
I've also tried to compile it from source:
PyGTK asked for pkg-config and pygobject.
Pygobject asked for pkg-config.
Pkg-config asked for pkg-config and glib:
configure: error: pkg-config and glib-2.0 not found, please set
GLIB_CFLAGS and GLIB_LIBS to the correct values
I know that there is no glib on Mac by default. Where can I get it?
Cheers!
_______________________________________________
pygtk mailing list py...@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
> Hi there!
>
> How to install it?
>
> This FAQ looks outdated:
> http://faq.pygtk.org/index.py?req=show&file=faq01.019.htp
The entry and links are outdated, but the ways are right...
If you want to use GTK-OSX and jhbuild, see the new page:
http://live.gnome.org/GTK%2B/OSX/Building (or gtk.org)
If you want to use MacPorts or Fink, the links are now:
http://www.macports.org/ and http://www.finkproject.org/
> I've also tried to compile it from source:
> PyGTK asked for pkg-config and pygobject.
> Pygobject asked for pkg-config.
> Pkg-config asked for pkg-config and glib:
> configure: error: pkg-config and glib-2.0 not found, please set
> GLIB_CFLAGS and GLIB_LIBS to the correct values
>
> I know that there is no glib on Mac by default. Where can I get it?
If you want to compile everything up from source, see:
http://developer.gnome.org/gtk/stable/gtk-building.html
I have made some binary packages, for Mac OS X 10.5 up:
http://macpkg.sourceforge.net/
The PyGTK.pkg contains everything needed to run PyGTK.
--anders
In the mean time here's a video of a bunny opening your mail http://www.youtube.com/watch?v=LMyaRmTwdKs
Your mail will not be forwarded and I will contact you when I come back, alternatively you can contact one of the other administrators or email in...@astalavista.com
Merry christmas and a happy new year!
Best regards,
Sykadul
I've installed pyGTK:
sudo port -v install py26-gtk
I've copied the module to have a chance to run it by typing "python":
cp /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygtk.py
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/pygtk.py
Thanks for your help.
I've been using Homebrew (https://github.com/mxcl/homebrew) for a while and I'm very happy with it. Big advantage is that it's not compiling everything from source (it's using the system Python installation).
There are several forks with PyGtk included. I'm currently using https://github.com/ashgti/homebrew.
However, since I upgraded to OS X Lion, I'm facing some issues with signal handling. Default stuff al works, only my own library (Gaphas) is having some trouble.
Regards,
Arjan
> I've used MacPorts.
>
> I've installed pyGTK:
> sudo port -v install py26-gtk
>
> I've copied the module to have a chance to run it by typing "python":
> cp /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygtk.py
> /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/pygtk.py
>
> Thanks for your help.
That is not supported, mixing installations like that...
If you use MacPorts PyGTK, you need to use /opt/local/bin/python2.6
rather than /usr/bin/python. And you'd normally use "site-packages" ?
/Library/Python/2.6/site-packages/
The same goes for Fink, and pygtk2-gtk-py26 (with /sw/bin/python2.6).
If you use GTK-OSX, you'll bundle both Python and GTK with your app.
--anders
> I've been using Homebrew (https://github.com/mxcl/homebrew) for a while and I'm very happy with it. Big advantage is that it's not compiling everything from source (it's using the system Python installation).
>
> There are several forks with PyGtk included. I'm currently using https://github.com/ashgti/homebrew.
I don't use Homebrew, for this.
1) It's _not_ supported upstream (no Python modules allowed)
2) It would use the X11 server, rather than the native Quartz
3) You would still need Xcode and compile GTK+ etc from source
I did have my own fork of Homebrew, and it worked just fine...
It would be possible to use Python, Quartz and "bottles" even
with Homebrew, but in the end* it just wasn't worth the effort ?
* https://github.com/mxcl/homebrew/pull/3946
So that's why I did my own build system and binary packages. :-P
--anders
> Arjan Molenaar wrote:
>
>> I've been using Homebrew (https://github.com/mxcl/homebrew) for a while and I'm very happy with it. Big advantage is that it's not compiling everything from source (it's using the system Python installation).
>>
>> There are several forks with PyGtk included. I'm currently using https://github.com/ashgti/homebrew.
>
> I don't use Homebrew, for this.
>
> 1) It's _not_ supported upstream (no Python modules allowed)
> 2) It would use the X11 server, rather than the native Quartz
> 3) You would still need Xcode and compile GTK+ etc from source
>
> I did have my own fork of Homebrew, and it worked just fine...
> It would be possible to use Python, Quartz and "bottles" even
> with Homebrew, but in the end* it just wasn't worth the effort ?
>
> * https://github.com/mxcl/homebrew/pull/3946
>
> So that's why I did my own build system and binary packages. :-P
>
> --anders
I saw a mail come by on this subject a while ago indeed. Back then I did not have time to look into it. I'll give it a try. Thanks for reminding :).
There are a few things behaving slightly different in the Quartz version, but I think I can iron those out.
Personally I have no trouble using X11, but towards users using native Quartz is somewhat more usable.
Regards,
Arjan
Are you sure? I've successfully imported the module:
$ python
>>> import pygtk
>>> dir(pygtk)
['__all__', '__builtins__', '__doc__', '__file__', '__name__',
'__package__', '_get_available_versions', '_our_dir',
'_pygtk_2_0_dir', '_pygtk_dir_pat', '_pygtk_required_version',
'fnmatch', 'glob', 'os', 'require', 'require20', 'sys']
> And you'd normally use "site-packages"?
I use the default one.
http://docs.python.org/using/mac.html:
"The Apple-provided build of Python is installed in
/System/Library/Frameworks/Python.framework and /usr/bin/python,
respectively."
Is there a way to use PyGTK while running "python" (/usr/bin/python)?
> There are a few things behaving slightly different in the Quartz version, but I think I can iron those out.
>
> Personally I have no trouble using X11, but towards users using native Quartz is somewhat more usable.
It's not like there's any major difference in appearance -
the main visible change is whether the window has an [X]...
There's a gtk-quartz-engine, but it's kinda buggy so I just
used Clearlooks as the default (but Murrine is included too).
I see that your brew fork have a "native-gtk+" formula too,
so I guess it has both covered. But Homebrew is all about X11.
https://github.com/mxcl/homebrew/issues/1442
https://github.com/mxcl/homebrew/issues/1612
--anders
>> That is not supported, mixing installations like that...
>> If you use MacPorts PyGTK, you need to use /opt/local/bin/python2.6
>> rather than /usr/bin/python.
>
> Are you sure? I've successfully imported the module:
[...]
It's not so much about "can't" as it is about "shouldn't".
> Is there a way to use PyGTK while running "python" (/usr/bin/python)?
Yes, use a PyGTK installation intended for system python ?
--anders
Should I install any other modules if I want to use it for drawing?
> Arjan Molenaar wrote:
>
>> There are a few things behaving slightly different in the Quartz version, but I think I can iron those out.
>>
>> Personally I have no trouble using X11, but towards users using native Quartz is somewhat more usable.
>
> It's not like there's any major difference in appearance -
> the main visible change is whether the window has an [X]...
>
> There's a gtk-quartz-engine, but it's kinda buggy so I just
> used Clearlooks as the default (but Murrine is included too).
>
>
> I see that your brew fork have a "native-gtk+" formula too,
> so I guess it has both covered. But Homebrew is all about X11.
>
> https://github.com/mxcl/homebrew/issues/1442
> https://github.com/mxcl/homebrew/issues/1612
>
> --anders
>
Hi,
When playing around I noticed DnD is not fully operational. I'm missing the context.targets. Since my app is quite dependent on DnD this is a big miss.
Do you know if a newer release of Gtk+ 2.x fixes this? If so, do you plan on making a build for that?
Any plans on preparing an installation for GTK+ 3?
Is your build/release process documented somewhere?
Regards,
Arjan
> When playing around I noticed DnD is not fully operational. I'm missing the context.targets. Since my app is quite dependent on DnD this is a big miss.
>
> Do you know if a newer release of Gtk+ 2.x fixes this? If so, do you plan on making a build for that?
I don't know, but if you have a reproducer then check
the mailing list and the bug list if you haven't already ?
Our Zero Install apps don't really use much of DnD, or
any other advanced features of PyGTK for that matter. :-)
> Any plans on preparing an installation for GTK+ 3?
>
> Is your build/release process documented somewhere?
Not really, and it's in transit over to the new project...
http://macpkg.git.sourceforge.net/git/gitweb-index.cgi
It's based on the Win32 packages (from http://www.gtk.org/):
http://afb.users.sourceforge.net/zero-install/buildscripts/
I'll probably have it download and checksum the tarballs too,
but currently it assumes that you have already done so before
and placed everything in the same directory that is used for
the build (the scripts just use the current working directory).
Not sure if there'll be any Python 3000 or GTK+ 3.2 packages,
but probably a 2.24.1 PyGTK.pkg - to match the Win32 offering ?
All the actual development takes place in the GTK-OSX project
on gnome.org, but it doesn't offer any pre-compiled binaries.
--anders
> Arjan Molenaar:
>
>> When playing around I noticed DnD is not fully operational. I'm missing the context.targets. Since my app is quite dependent on DnD this is a big miss.
>>
>> Do you know if a newer release of Gtk+ 2.x fixes this? If so, do you plan on making a build for that?
>
> I don't know, but if you have a reproducer then check
> the mailing list and the bug list if you haven't already ?
>
> Our Zero Install apps don't really use much of DnD, or
> any other advanced features of PyGTK for that matter. :-)
>
>> Any plans on preparing an installation for GTK+ 3?
>>
>> Is your build/release process documented somewhere?
>
> Not really, and it's in transit over to the new project...
> http://macpkg.git.sourceforge.net/git/gitweb-index.cgi
> It's based on the Win32 packages (from http://www.gtk.org/):
> http://afb.users.sourceforge.net/zero-install/buildscripts/
>
> I'll probably have it download and checksum the tarballs too,
> but currently it assumes that you have already done so before
> and placed everything in the same directory that is used for
> the build (the scripts just use the current working directory).
>
> Not sure if there'll be any Python 3000 or GTK+ 3.2 packages,
> but probably a 2.24.1 PyGTK.pkg - to match the Win32 offering ?
>
> All the actual development takes place in the GTK-OSX project
> on gnome.org, but it doesn't offer any pre-compiled binaries.
I managed to compile the whole lot with jhbuild. I'll spend some time with the Quartz port. There are a few things that can be improved, so I might as well lend a hand (as far as time permits). ;)
Regards,
Arjan
>>> Any plans on preparing an installation for GTK+ 3?
>>>
>>> Is your build/release process documented somewhere?
>> Not sure if there'll be any Python 3000 or GTK+ 3.2 packages,
>> but probably a 2.24.1 PyGTK.pkg - to match the Win32 offering ?
>>
>> All the actual development takes place in the GTK-OSX project
>> on gnome.org, but it doesn't offer any pre-compiled binaries.
>
> I managed to compile the whole lot with jhbuild. I'll spend some time with the Quartz port. There are a few things that can be improved, so I might as well lend a hand (as far as time permits). ;)
That's probably the best, as that's the upstream build system.
It does require that you bundle Python and GTK+ with your app,
but that only matters for distribution and not for development.
For the record, the URL is: http://live.gnome.org/GTK%2B/OSX
But when I packaged our app for the fourth* time, I wondered
why there were no binaries - so went ahead and did a fifth pkg.
--anders
* port, fink, jhbuild, brew
> The PyGTK.pkg contains everything needed to run PyGTK.
What is the md5 for the package. Or where can I find it. I'm getting:
MD5 (/Users/me/Downloads/PyGTK.pkg) = 06196e48d022e458b60d43784a91d86b
--
View this message in context: http://python.6.n6.nabble.com/How-to-install-pyGTK-on-Mac-tp2661952p4463134.html
Sent from the Gtk+ - Python mailing list archive at Nabble.com.
>> I have made some binary packages, for Mac OS X 10.5 up:
>> http://macpkg.sourceforge.net/
>
>> The PyGTK.pkg contains everything needed to run PyGTK.
>
> What is the md5 for the package. Or where can I find it. I'm getting:
>
> MD5 (/Users/me/Downloads/PyGTK.pkg) = 06196e48d022e458b60d43784a91d86b
Find it on http://sourceforge.net/projects/macpkg/files/PyGTK/2.24.0/
Is there a problem with the package ? Maybe I should have signed it.
--anders
PS. The (i) button on the download page above has the MD5 and SHA1.
I don't know yet, I haven't installed it. I wanted to make sure I was
downloading what was advertised.
Thanks.
--
View this message in context: http://python.6.n6.nabble.com/How-to-install-pyGTK-on-Mac-tp2661952p4463341.html
Sent from the Gtk+ - Python mailing list archive at Nabble.com.
My install seems to be working on some hello world gui's. I'm reading the
tutorial here:
http://www.learngtk.org/pygtk-tutorial
Thanks for your help--and for creating the mac os x package. I've used
tkinter and wxpython, so I'm curious to see how pygtk stacks up.
--
View this message in context: http://python.6.n6.nabble.com/How-to-install-pyGTK-on-Mac-tp2661952p4463580.html