[pygtk] ImportError: DLL load failed

David Ripton dripton at ripton.net
Tue Feb 24 05:43:41 WST 2009


On 2009.02.23 20:32:22 +0100, Martin Walser wrote:
> I just upgraded from Python 2.5 to Python 2.6 on my Windows machine.
> But. unfortunately I can't get PyGTK to run anymore.
> 1. Built Python 2.6 myself. I also did the necessary registry entries, so
> setup of pygtk etc. finds the Py dir
> 
> 2. gtk-dev-2.12.9-win32-2.exe . installed to: c:\libs\GTK installiert
> 3. pygtk-2.12.1-3.win32-py2.6.exe . installed in new python dir
> 4. pycairo-1.4.12-2.win32-py2.6.exe . installed in new python dir
> 5. pygobject-2.14.2-2.win32-py2.6.exe . installed in new python dir

> But when I try to run my application, Python gives me:
> ImportError: DLL load failed: The specified module could not be found. 

> Wondering which DLL is missing I checked the _gobject with dependency
> walker.

> Looks like MSVCR90.dll is missing.
> 
> I didn't wonder much, as I'm still using VS 2005.
> 
> But installing the VS2008 and VS2008+SP1 redists didn't help.
> 
> Copying either of the dlls of the VS2008 redist package aside the
> _gobject.pyd result in a crash only: wrong dll.
> Am I on the completely wrong trip anyway seeking the problem with a missing
> MSVCR90.dll?

I'm not a Windows person, but I know that the new default compiler for
Python 2.6 on Windows is VS 2008.  And I believe that mixing Python
compiled with one compiler with extension modules compiled with another
(significantly different) compiler doesn't work.

So I believe the reasonable options are:

* use only precompiled binaries, all built on VS 2008

* build everything yourself, so it all uses your VS 2005

* upgrade to VS 2008 so that things you build are compatible with
other people's precompiled binaries and you're free to mix and match

* go back to Python 2.5

* switch to another OS (the same kinds of version problems exist, but
people care less when upgrading the compiler is free)

-- 
David Ripton    dripton at ripton.net


More information about the pygtk mailing list