Skip to content
This repository

PyGTK All-in-one installer, stable releases are on:

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 wix
Octocat-spinner-32 .gitignore
Octocat-spinner-32 AUTHORS
Octocat-spinner-32 COPYING
Octocat-spinner-32 README.rst
Octocat-spinner-32 TODO
README.rst

About the pygtk-installer project

The pygtk-installer project provides a set of tools to build the PyGTK All-in-one installer and it's various dependencies. There are currently versions of the PyGTK All-in-one installer supporting 32 bit versions of Python 2.6 and Python 2.7.

Included tools:

  • build_glade.sh: a tool that builds glade3 binaries for mswindows with "Python Widgets Support" for each supported Python version.
  • build_bindings.sh: a tool that builds windows installer packages (both .exe and .msi) for pycairo, pygobject, pygtk, pygoocanvas, pygtksourceview and pyrsvg for each supported Python version.
  • build_installer.py: a tool that generates the all-in-one installer bundling the separate .msi installers created by build_bindings.sh, the glade binaries created by build_glade.sh and various GTK+ runtime packages from ftp.gnome.org/pub/GNOME/binaries/win32/.

Using the PyGTK All-in-one installer

The PyGTK All-in-one version number

The PyGTK All-in-one installers' version number does not map directly to the PyGTK version number. This is a requirement to support windows installer major upgrades. The version number is constructed as follows:

PYGTK_MAJOR.PYGTK_MINOR.INSTALLER_REVISION

Stable releases are kept available for download, testing revisions are removed from the download area once they are superseded by newer versions.

What file should I use?

All the .msi files are named as follows:

pygtk-all-in-one-X.X.X.winYY-pyZ.Z.msi

Where X.X.X is the PyGTK All-in-one version number, YY is 32 or 64 and Z.Z is the Python version number the installer supports.

You need to make sure both YY and Z.Z correspond to the version of the Python interpreter that's installed on your system.

I'm new, how do I start?

First, you'll need to install a 32 bit Python interpreter. Currently, you can choose between Python 2.6 and Python 2.7.

Then you install the PyGTK All-in-one version that matches the Python version you choose above. It's that easy!

Note: There are currently no 64 bit builds of PyGTK All-in-one!

Migrating from PyGTK+PyGObject+PyCairo packages

If you have used some or all of the separate PyGTK, PyGObject, PyGooCanvas, PyGtkSourceView2, PyRsvg and PyCairo packages before, please ensure they are uninstalled before you begin with the PyGTK All-in-one installer.

The all-in-one installer does not check for their presence and will happily overwrite files that belong to the separate packages. If you forget to check for this you risk the following scenario:

  • install Python
  • install PyCairo, PyGTK and PyGObject
  • install PyGTK All-in-one
  • uninstall PyCairo, PyGTK and PyGObject

you now have a broken pygtk all-in-one installation

This would also be a good time to remove the GTK+ runtime you've used with the separate PyG* packages and to clean your PATH environment variable.

Note that the PyCaio, PyGObject, PyGTK, PyGoocanvas, PyGtkSourceView2 and PyRsvg .exe installers (like any other .exe installer generated by distutils) sometimes leaves things behind when you uninstall them.

Default installation

A default PyGTK All-in-one installation automatically detects the correct Python installation directory and if Python was installed for all users or just yourself. These values are then used by the PyGTK All-in-one installer. To start a default PyGTK All-in-one installation, simply double click the .msi file or execute the following command from a Command Prompt (cmd.exe):

%WINDIR%\system32\msiexec.exe /i pygtk-all-in-one-X.X.X.winYY-pyZ.Z.msi

Custom installation

Like any other Windows Installer package, you can change how PyGTK All-in-one will be installed on you system by passing parameters (setting public properties for those familiar with windows installer). Execute msiexec /help for a list of options supported for all .msi installation packages.

Target directory

The TARGETDIR property determines the root directory of the PyGTK All-in-one installation. If this property is set, the PyGTK All-in-one installer does not automatically detect the installation directory of the Python interpreter installed on you system. For example, a custom installation directory can be specified with:

TARGETDIR=R:\pythonX

Before you set a custom TARGETDIR property, you need to make sure both python.exe and pythonw.exe exist in that directory or the installation will fail.

Installation for All Users

The ALLUSERS property determines if PyGTK All-in-one should be installed for all users, or only for the user that initiated the installation. If you want to install for all users, set the ALLUSERS property to "1":

ALLUSERS=1

If you want to install for the current user only, you should not specify the ALLUSERS property at all. Hence, a per user installation is the default installation mode for custom installations. Note that "1" is the only valid value for the ALLUSERS property!

You need to combine this property with the TARGETDIR property. Setting ALLUSERS disables the automatic Python interpreter detection.

Feature Selection

The INSTALLLEVEL property determines what features are going to be installed. If the INSTALLLEVEL property is not set, it's value defaults to 1 which causes a basic set of features to be installed (GTK+ runtime, PyGTK, PyGObject and PyCairo)

If you set INSTALLLEVEL to 2 (or any number greater than 2), you instruct the installer to do a "complete" installation (all features will be installed).

There is another method to control what features should be installed by controlling the ADDLOCAL, REMOVE, ADDDEFAULT, REINSTALL, etc properties. Check MSDN for more details.

Other msiexec options

Take note that if the PyGTK All-in-one installer is run with no or a basic UI (/q[n|b]) the automatic Python installation detection is skipped. In this case setting the TARGETDIR property is required. You can also set the ALLUSERS property if you want a system wide installation.

The PATH environment variable

The PyGTK All-in-one installer does not require you to fiddle with the PATH environment variable. The PyGTK version that's installed with the all-in-one installer takes care of loading the bundled GTK+ runtime on the PATH environment variable on interpreter startup. As a consequence simply importing gobject, gtk, etc works out of the box. As an added advantage there is no possible way multiple GTK+ runtime versions on your system or user PATH environment variable can interfere with PyGTK All-in-one.

Getting help

If something doesn't work as expected, you'll need to generate a couple of log files before you'll be able to get help. It is simply impossible to determine why something went wrong without those log files!

If something went wrong when installing, you'll need both

  • An installation log (install.log). Execute the following command from a Command Prompt (cmd.exe):

    %WINDIR%\system32\msiexec.exe -i pygtk-all-in-one-X.X.X.winYY-pyZ.Z.msi /l*vx install.log
    
  • An execution log (import.log). Execute the following command from a Command Prompt (cmd.exe):

    python -v -c "import gtk">import.log 2>&1
    

If something went wrong when uninstalling, you'll need an unistall log. Execute the following command from a Command Prompt (cmd.exe):

%WINDIR%\system32\msiexec.exe -x pygtk-all-in-one-X.X.X.winYY-pyZ.Z.msi /l*vx uninstall.log

Known issues with 2.22.4

Something went wrong with that request. Please try again.