views:

223

answers:

1

Hello,

I am trying to run my GTK app on Windows XP and I am having troubles with an import. I have installed the following as needed and recommended:

python-2.6.msi 
gtk2-runtime.2-16.6.exe
pycairo-1.8.6.exe
pygobject-2.20.0
pygtk-2.16.0.exe 
pyserial-2.5.exe

However, I am getting the following error when running my script:

Traceback (most recent call last):
  File "C:\python26\app\src\start.py", line 22, in <module>
    import gtk
  File "C:\Python26\Lib\site-packages\gtk-2.0\gtk\__init__.py", line 30, in <mod
ule>
    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 <mo
dule>
    from glib._glib import *
ImportError: DLL load failed: The specified module could not be found.

GTK is installed into C:\gtk\bin and is setup in my System PATH.

Am I missing something obvious here?

Any help would be appreciated.

Thank-you kindly.

Andy

+2  A: 

I was getting the same issue - I'm not sure why, but I suspect it has something to do with some of the install/lookup paths. I tried adding all sorts of stuff to my path, but nothing seemed to work.

What I did to fix it was to uninstall python et. al. and reinstall using the Python (x,y) package. It's a fairly large download, but it has tons of tools, including several (matplotlib, numpy, scipy, IPython, etc) that I needed/wanted.

Wayne Werner
Does anyone know of a smaller package that will do the job? I haven't been able to obtain it (seems to be down at the time), but it appears to be over 400 megs large ...
Anthony Labarre