I installed the latest versions of python (2.6.5), gtk +, pygtk (and friends) from my respective sites in Windows XP SP3. When you try to import gtk (or just glib, for that matter), an ImportError is created:
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import gtk Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python26\lib\site-packages\gtk-2.0\gtk\__init__.py", line 38, in <module> import gobject as _gobject File "C:\Python26\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:\Python26\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.
It worked on the same machine about 6 months ago, although this time I installed it again. I tried different versions of the libraries, but could not get it to work.
There is a couple of pages where there is to this, but do not offer a solution, and I can not find it.
python gtk pygtk
Jon
source share