Mark Hammond <skippy.hamm...@gmail.com> wrote:

> > $ python -i
> > Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit 
> > (Intel)] on win32
> > Type "help", "copyright", "credits" or "license" for more information.
> >>>> import win32api
> > Traceback (most recent call last):
> >    File "<stdin>", line 1, in<module>
> > ImportError: DLL load failed: This application has failed to start because 
> > the application configuration is incorrect. Reinstalling the application 
> > may fix this problem.
> 
> This means the C runtime "assembly" isn't being found (and FWIW, this
> error is being raised by windows itself, not by Python - so it isn't a
> python config problem per-se).  It should be the case that the
> assembly used by Python itself will work and (IIRC) win32api.pyd
> shouldn't have a reference to that assembly.
> 
> However, if things work using the regular installer, I believe the
> problem will be the copying of those DLLs to system32 - that
> pythonxx.dll, the pywin32 DLLs (not .pyds) and the manifest all need
> to be in the same directory.

I don't think I've tried that config.  I'll give it a shot.

[After trying it...]  Nope, that may be necessary, but it's not
sufficient.  I installed Python in a private directory "just for me",
then copied in the pywin32 extensions, then copied the pywin32 DLLs to
the same directory as the manifest and the python26.dll:

$ ls
DLLs LICENSE.txt Microsoft.VC90.CRT.manifest README.txt include
msvcr90.dll python26.dll pythonw.exe tcl Doc Lib NEWS.txt Tools libs
python.exe pythoncom26.dll pywintypes26.dll w9xpopen.exe

$ python -i
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32api
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: This application has failed to start because the 
application configuration is incorrect. Reinstalling the application may fix 
this problem.
>>> 


Right now, I can only get a working Python+PyWin32 if I use, on the
Python MSI, "Install for all users", which can't be selected for a
command-line install (as far as I can tell).  Then I can copy the
pywin32 DLLs into C:\Windows\system32\, and things will work.

> Sadly I'm in the middle of moving house and will not have time to look
> into this in more detail for a few days...

No prob.  I've got other things to look at till next week, too.

Bill
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to