You can grab the new build here: MacPyGTK_SnowLeopard_091809.dmg
Remember to follow the three simple instructions in README.txt in order to make it work. B.t.w., one has to be running Python in 32-bit mode for it to work. This can be done in two ways:
- By setting this environment variable VERSIONER_PYTHON_PREFER_32_BIT=yes
- By issuing this command (once): defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
Hi!
ReplyDeleteI used your build with meld (http://meld.sourceforge.net/) and it works.
It´s a bit ugly and the integration with the system is null but it works ok.
Thanks.
Thanks! It was a nightmare to try to install GTK without direct internet connection.
ReplyDeleteYes!
ReplyDeleteYou're my hero. I can finally use my pygtk apps on my mac, at last, since 10.6 upgrade. I was struggling with macport without results and was almost resignated to build it by hand when I found your package.
I just had a problem with "import gtk" statement, that issued a "_glib.so: mach-o, but wrong architecture". The VERSIONER_PYTHON_PREFER_32_BIT instruction bit did not solve this problem. But I managed to find another solution by using "arch -i386 python" instead of "python", that will soon be turned into an alias in my profile.
I have probably missed something in your instruction, but anyway, I'm too happy to get my apps back.
Thank you *so* much.
Do you mind sharing your steps to build PyGTK?
ReplyDeleteHi Ryanitus,
ReplyDeletetake a look at this post: http://kedeligdata.blogspot.com/2009/03/pygtk-natively-on-mac.html
I have simply used the jhbuild build script so it is pretty straightforward. There are sometimes small build errors but they can often be solved by a little googling :-)
Best regards,
Mads
do you thing clearlooks engine could be compiled to work with this?
ReplyDeleteI have no idea - sorry :-)
ReplyDeleteThanks for putting this together!
ReplyDeleteDownloaded. Copied the MacPyGTK folder to /Developer. Set the 32bit flag. Set the PYTHONPATH to the folder specified.
Running the included hello_pygtk.py fails with "ImportError: No module named pygtk"
Are there any other requirements to getting this running on a clean 10.6 install? Do I need to build and install GTK from source first? Or is this package 100% inclusive of everything I should need to run a PyGTK app?
@Bryan: You need to copy the pygtk module to your Python interpreter's site-packages dir - or ts set the PYTHONPATH environment variable so that it points to the place where you keep your pkgkt module.
ReplyDeleteI think this is described in the README file...
Best regards,
Mads
Hi,
ReplyDeleteI tried building this and I had a few errors for wrong architecture, so I used the advice to build with arch -i386, but now I am getting a posix=_spawnp error saying Bad CPU type in executable. I looked online and this has to do with PPC's, but I have a new intel MBP running on 10.6.3.
Any ideas?
It has been a long time since I have built it myself - so I'm sorry but I can't help you here. I had no problems building it...
ReplyDeleteWhen I try to run hello_pygtk.py I get an Import Error:
ReplyDeleteImportError: No module named pygtk
I assume it has something to do with my path. In a terminal window I did this:
% VERSIONER_PYTHON_PREFER_32_BIT=yes
% PYTHONPATH=/Developer/MacPyGTK/inst/lib/python2.6/site-packages
Am I doing it wrong?
Thanks
Ahh OK I added the lines to my .profile and it no longer gets the import error but gets the architecture error.
ReplyDeleteCheck your environment to see if you have actually set the correct variables. e.g.: echo $VERSIONER_PYTHON_PREFER_32_BIT
ReplyDeleteIf your PYTHONPATH and the prefer-32-bit thingy is set everything should work. If you want to set an environment variable that only "lives" for a single command, you need to specify the variable on the same line as you run the command. E.g.:
VERSIONER_PYTHON_PREFER_32_BIT=yes python
Having issues with the import gtk. Says it cannot find module. I setup the path and the 32 bit. Double checked them. pygtk is getting imported with test script but not gtk
ReplyDelete@Tobias: The problem is often that people have multiple versions of Python installed. Then when they e.g., place the Python modules in /Library/Python/2.5/site-packages/ they don't understand why the module can't be imported (which could be because their /usr/bin/python symlink is pointing to python2.4 or python2.6). Try to "hard code" the PYTHONPATH by issuing this command:
ReplyDeletePYTHONPATH=/path/to/whereever/you/installed/pygtk python
That should do the trick I hope :-)
The download link for the library seems to be broken. When I clicked on the link I get a file not found error. Can you re-upload the library and update the link here? I really need this one as I am desperately trying to run tortoisehg gtk version on mac.
ReplyDelete@Ashith: The link works again now.
ReplyDeleteBe aware that this was built for an older version of Snow Leopard. I don't know whether it will work on the current version.