[pygtk] DLL hell, revisited, msvcr90 and others

Dieter Verfaillie dieterv at optionexplicit.be
Fri Oct 14 01:36:04 WST 2011

On Thu, 13 Oct 2011 11:08:08 -0400, Kris Rixx wrote:
> The OS is XP 64 bit. I'm tied to this OS. All the Python and gtk 
> loads
> are 32 bit. Python 2.6, pygtk2.12.1-3-win32

PyGTK 2.12? A lot of work went into improving the .exe and .msi
installers for 2.24 just to be able to create the all-in-one
installer. So let's forget about this ancient version...

> I've tried Python 2.7 with the pygtk all-in-one loader

Which version of the all-in-one installer did you use? The rest of
my reply assumes you've got Python 2.7 installed into C:\Python27
and the most recent all-in-one installer [1] is being used.

> Executing import gtk, I get a traceback whose last entry is:
> File "c:Python26libsite-packagesgtk-2.0gobjectconstants.py, line 22,
> in  
>    from _gobject import type_from_name
> ImportError: DLL load failed: The specified procedure could not be
> found..
> I tried Dependency Walker on

Before you do this, I'd like to see the contents of the import.log
file the following command creates. This is described as an "execution
log" in the aio installer's README file [2]:
- open cmd.exe
- execute:
     python -v -c "import gtk">import.log 2>&1

> c:\python\lib\site-packages\gtk-2.0\gobject\_gobject.pyd

That's wrong. You should:
- start Dependency Walker (in your case, verify it is the
     2.2.6000 version for x64)
- open C:\Python27\python.exe
- hit F7
- set program arguments to
     -c "import gtk"
- verify all check boxes are checked
- hit the OK button
- wait until python.exe finishes execution...

You now should have a complete tree of all dependencies and
hopefully see what's gone wrong. Save this as "importgtk.dwi".

> I replaced

Don't do that.

> or imported the DLLs that it couldn't find, msvc90.dll,
> ieshims.dll and wer.dll. Now it complains about ncrypt.dll and I
> suspect it will complain about more when I replace that. More
> disturbing are the errors it reports about "Modules with different 
> types were found".

So, you have most likely succeeded in breaking your system. Before you
proceed with the tests I've described above, restore all changes you've
done (let's hope you took notes) or reinstall your os.

Then either:
a) upload import.log and importgtk.dwi somewhere and point us to their
    location or
b) send me the import.log and importgtk.dwi files (preferably 
    with 7-zip) by email. Please do not send a copy to this list, your
    message will get stuck in the moderation queue due to the large size 



More information about the pygtk mailing list