Graphical interface with Python on Windows 7

I started by installing Python and other required software to my 64-bit windows 7 computer. Source: Make: Arduino Bots and Gadgets -book and For now stick with the files presented on botbook’s website, until I find a solution to my problem. Might have something to do with the 64-bit installation. The instructions should be the same regardless of file versions (as long as they are for the same python version).

1. Download and install Python:
1+.Make sure that the installers on the libraries find the python installation folder when you install them.
2. Download and install pycairo:
3. Download and install pygobject:
4. Download and install pygtk:
5. Download gtk+:

5 a) create a folder named “gtkbundle” in your c\Program Files (x86)\
5 b) extract previously downloaded gtk+ bundle and copy all the folders to the folder created on 5 a)

6. a) Open start menu’s computer properties and open the advanced system settings.
6. b) Click the “Environment Variables” button
6. c) Locate “Path” under “System variables” and click edit
6. d) Do not change anything! scroll to the end and add the following (depends on installation directory) “;C\Program Files (x86)\gtkbundle\bin;C:\Python27
6. e) save and exit
6. f) close all command prompts if any and open a new one and write “gtk-demo” and hit enter. A new window should open displaying GTK’s features. More info at:

My actual problem:

I wrote a test program found on the book (mentioned in sources) to make a window

The code:

The error:


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