What happened to my install of Windows GTK + for Python?

Overcoming this. I installed pygtk 2.24, pycairo 1.8.10 and pyobject 2.28.3 for my 32-bit system and my installed version of Python version 2.7. I have GTK + installed and working.

In addition, I have the path to "C: \ Python27 \ Lib \ site-packages \ gtk-2.0" set in sys.path (where pygtk and pobject are located), and my Path system variable for GTK_BASEPATH is set to C : \ gtk where GTK + is located.

I get this error when trying to import gtk:

Traceback (most recent call last): File "<pyshell#6>", line 1, in <module> import gtk File "C:\Python27\lib\site-packages\gtk-2.0\gtk\__init__.py", line 30, in <module> import gobject as _gobject File "C:\Python27\lib\site-packages\gtk-2.0\gobject\__init__.py", line 26, in <module> from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \ File "C:\Python27\lib\site-packages\gtk-2.0\glib\__init__.py", line 22, in <module> from glib._glib import * ImportError: DLL load failed: The specified procedure could not be found. 

I can’t understand what happened. Does anyone have any ideas?

EDIT

I found this post and I found a variable for GtkSharp (I don’t know where it came from), but deleting it did not help.

+4
source share
2 answers

Try uninstalling all of this (including GTK + unless you need it) and the PyGTK all-in-one installer instead .

+6
source

If you compile your own, make sure you go to the "dist" folder and run the created installer to use your version on your computer.

Instructions for compiling Windows:
http://git.gnome.org/browse/pygtk/tree/README.win32

+1
source

All Articles