Friday, December 3, 2010

pyGTK issues on with Python 2.7 , GTK 2.22.0 and Windows 7

I just installed Python, pyGTK, GTK+ on this system, and wrestled with getting Python to load GTK for a couple hours.

Everytime I would open Python and type "import gtk", I would receive the following error:

Traceback (most recent call last):
File "", line 1, in
import gtk
File "C:\Python27\lib\site-packages\gtk-2.0\gtk\__init__.py", line
40, in
from gtk import _gtk
ImportError: DLL load failed: The specified procedure could not be found.
>>>

I could not get past this error until the following:

a) made the GTK runtime bin directory path to the first item in the PATH system variable (maybe something else like GIMP has a GTK dll that isn't compatible)

b) restarted the computer (killing and restarting explorer seems to update the path statement for the session, but not for some applications.)