[pygtk] Trouble with GTK

kani . jkani4 at gmail.com
Wed Mar 12 12:43:34 WST 2008


Hi,

If, you are running your script on Windows, It is not necessary to
write "pygtk.require(''2.0").

I the case of me, I write the script following:

import sys
import pygtk
if sys.platform !='win32':
   pygtk.require('2.0')
import gtk

best regards.

2008/3/12, Nathan Matteson <nathan �� eightyproof.com>:
> Hey folks. My first post, and I'm a Python novice.
>
>  Here's my problem:
>
>     >>> import pygtk
>     >>> pygtk.require ('2.0')
>     >>> import gtk
>
>     Traceback (most recent call last):
>       File "<pyshell#2>", line 1, in <module>
>     import gtk
>       File "C:\Python25\Lib\site-packages\gtk-2.0\gtk\__init__.py", line
>  38, in <module>
>         import gobject as _gobject
>       File "C:\Python25\Lib\site-packages\gtk-2.0\gobject\__init__.py",
>  line 30, in <module>
>         from _gobject import *
>     ImportError: DLL load failed: The specified procedure could not be
>  found.
>     >>>
>
>  I'm running the official python.org 2.5 build on Windows XP, in
>  C:\Python25. GTK is in C:\gtk. I also have PHP-GTK in C:\php-gtk2, but
>  this directory shows up nowhere in my Paths.
>
>  Incidentally, I've also combed through WINDOWS/system32 for errant DLLs.
>  I've done fresh installs for Python, GTK, Glade, pygtk, pygobject, and
>  pycairo.
>
>  Also, my Paths seem to be fine: they include C:\gtk\bin; C:\gtk\lib;
>  C:\Python25; C:\php; C:\php\pear in that order.
>
>  I'm sure I'm missing something very simple, but it's ruined my whole day
>  so far. Thanks for any help.
>
>  Cheers,
>  Nate
>  _______________________________________________
>  pygtk mailing list   pygtk �� daa.com.au
>  http://www.daa.com.au/mailman/listinfo/pygtk
>  Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>


More information about the pygtk mailing list