GTK import doesn't import first time

Dennis dsylvest at adelphia.net
Mon Aug 18 11:59:55 EDT 2003


The setup:

Windows XP Pro
Python 2.3
GTK+ 2.2.1.2 and pyGTK 1.99.17 for Python 2.3 from
http://www.pcpm.ucl.ac.be/~gustin/win32_ports/

I've downloaded and installed per the instructions the pyGTK and GTK+
for win32 from the above locations.  Folowing the instructions, I
import pygtk first, run pygtk.require('2.0') second and then import
gtk.  I receive an error on the import gtk the first time, but
immediately after, if I import again it works.  Even if I don't
impo0rt pyGTK at all and only import gtk, I get the same results.  Any
ideas?

PythonWin 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)]
on win32.
Portions Copyright 1994-2001 Mark Hammond (mhammond at skippinet.com.au)
- see 'Help/About PythonWin' for further copyright information.
>>> import pygtk
>>> pygtk.require('2.0')
>>> import gtk
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "D:\Python\Python23\lib\site-packages\gtk-2.0\gtk\__init__.py",
line 43, in ?
    from _gtk import *
ImportError: DLL load failed: The specified procedure could not be
found.
>>> import gtk
>>>

Thanks,
Dennis




More information about the Python-list mailing list