My chrismas present: All-in-One win32 python installer.

Since my Cherokee patch, I’ve been playing around with NSIS, the Windows tool for building installers. One of my obsessions with software is that entry barriers should be as low as possible in order to have a successful product and let people enjoy with it.

I’ve been using Python and PyGTK for five years, I think that right now, are probably the easiest and funniest tools to get introduced into software development and gui programming on the free software world. One of the most interesting feature is that they’re both cross-platform, so you can write software that can run in 90% of its code on almost any UNIX, Windows and Mac OS X.

Although, the problem with PyGTK is that is hard to setup on the most popular enviroment,  Windows, which kills its potential success on the mass audience.  Why is that hard to setup a PyGTK working enviroment right now? Well, let’s take a look on the steps you need to take if you don’t know anything about python and/or pygtk:

  1. Go to
  2. Go to the download section and figure out where the Windows installer is.
  3. Download the PyGTK Windows Installer from the GNOME FTP.
  4. Install it and figure out that you need the Python Installer (that’s not explained).
  5. Install it and figure out that you also need PyCairo and PyGobject. (not explained)
  6. Install Py[Cairo|Object], try PyGTK, and figure out that you also need the  GTK+ runtime for windows, which is on an unofficial webpage, since the official win32 gtk+ binaries are a bunch of .zip files. (not explained and very hard to figure out)
  7. Write "Hello World!".

As a summary, you have:

  • 5 different installers from 3 different sites
  • 3 critical steps not explained from the website, which force people to ask google and waste lot of time.

I would like to know how many windows users (which are the most of the people out there) have had gave up before to be able to even write a hello world and make it work.

Solutions? Well, the website issue is been addressed since I’ve been discussing this on the mailing list. Join the discussion.

Until then I’ve been using my NSIS-fu, and I’ve created a rudimentary installer that has everything together:

There is some things that I want to fix, for example, the PyGTK modules cannot be installed in silent mode, so it appears three dialogs "extra" that I would like to override. I also would like to fix some uninstalling problems and be able to detect previous Gtk+ or Python installations on runtime.

If you wanna help, patches are welcome:


83 thoughts on “My chrismas present: All-in-One win32 python installer.

  1. dear you have done a great job many prayers for you plus thank you alot and tons that atlast i am able to prgram on windows using pygtk its great!


  2. What is missing? This used to work on Python 24.
    Traceback (most recent call last):
    File “C:\a1\bin\PyGTK\Python\dms\MyAgent\”, line 61, in
    from dmslib import *
    File “C:\a1\bin\PyGTK\Python\lib\site-packages\dmslib\”, line 4, in
    from dmslib import d
    File “C:\a1\bin\PyGTK\Python\lib\site-packages\dmslib\”, line 7, in
    import gtk
    File “C:\a1\bin\PyGTK\Python\lib\site-packages\gtk-2.0\gtk\”, line 38, in
    import gobject as _gobject
    File “C:\a1\bin\PyGTK\Python\lib\site-packages\gtk-2.0\gobject\”, line 30, in
    from _gobject import *
    ImportError: DLL load failed: The specified procedure could not be found.


  3. import gobject
    File “C:\Python25\Lib\site-packages\gtk-2.0\gobject\”, line 38, in
    from _gobject import *
    ImportError: DLL load failed: Module not found.
    Yo estoy usando wine, al parecer el problema es que el sistema aborta cuando trata de instalar gtk-runtime


  4. Thank you so much, I didn’t get pygtk to work without this installer and got stuck without any hint what I might have been missing or what I might have done wrong.


  5. I usually work in Linux but I was asked to create something on the windows platform recently. I started installing cygwin and learning how to get pygtk set up. What a pain! Thank you so much for doing the leg work to get this package put together and running! I’ll be installing it tomorrow morning at work.


  6. I am glad to post my views and points in this blog, but I must say that webmaster of this blog has done a very great job to make his blog more informative and more discussable but unfortunately everything is same here that more than 80% in this and other blogs post their comments for making spam!!!, so i will really all this spam links to google band tool, because webmaster makes blogs for making discuss and for sloving each other problems.


  7. “from _gobject import” fails
    Did anyone find any clues about this problem?
    for me it’s on Windows Vista SP1, with a fresh install of the all-in-one installer.
    I have tried a few other combinations of python and GTK, and all got a similar (but not identical) result.
    the details:
    import gtk
    File “C:\apps\PyGTK\Python\Lib\site-packages\gtk-2.0\gtk\”, line 38, in
    import gobject as _gobject
    File “C:\apps\PyGTK\Python\Lib\site-packages\gtk-2.0\gobject\”, line 30, in
    from _gobject import *
    ImportError: DLL load failed: The specified module could not be found.


  8. If this is done with NSIS should I presume that I could easily add my python proggie and extra modules to the installer and send one file to a customer instead of going around installing 5 pakcages like before or suffer py2exe headache like yet before?


  9. I am a newbie. So, if some of my request for help is silly, I apologize ahead of time.
    I went to “PyGTK All-in-One Installer” link and there was nothing there. I then went to and the associated FAQ and they seem to have the complete steps which include your comments.
    Humm. The last posting was in 2007, perhaps you have given up on the all in 1 installer?


  10. Neither the installer, nor the NSIS Script are available for download anymore.
    Can you please at least get me the script so that I may see if I can put actual Python and GTK installers in?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s