Howard Lightstone <how...@eegsoftware.com> wrote:

> On Tue, Apr 20, 2010 at 10:14 AM, Bill Janssen <jans...@parc.com> wrote:
> 
> > Howard Lightstone <how...@eegsoftware.com> wrote:
> >
> > > I've had a private Python25 install running with win32 for a while.  I
> > > believe the trick is that the pythoncom25.dll and pywintypes25.dll have
> > to
> > > be in the SAME folder as the python.exe that you want to use (due to
> > Windoze
> > > own variety of internal search paths for DLLs).  In my code, I also alter
> > > the PATH to point to both the DLLs and (root) folder where the python.exe
> > > is.   I actually have an embedded interpreter in my instance with a
> > > subfolder of the entire Python25 installation.  I am able to run the
> > > python.exe and use the win32 code without changing any registry items on
> > > machines that have never had Python installed.
> >
> > Thanks, Howard.  That's just what I want to do.
> >
> > Unfortunately, I've tried just that (I think) and it didn't work.  I
> > install Python 2.6.5 "just for me" under a private directory
> > (C:\UpLib\1.7.9\python), then I unzip the 2.6.5 version of pywin32 and
> > put it in "the right place" (C:\UpLib\1.7.9\python\Lib\site-packages\).
> > Then I copy the two pywin32 DLLs to the right place
> > (C:\UpLib\1.7.9\python), just where the python.exe is.
> >
> > Then I set my path so that python.exe (and thus the two DLLs) are on it,
> > and try running Python:
> >
> > $ 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.
> > >>>
> > $
> >
> > Here's what the assembly XML for Python (also in C:\UpLib\1.7.9\python)
> > says:
> >
> > <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> > <!-- Copyright (c) Microsoft Corporation.  All rights reserved. -->
> > <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
> >    <noInheritable/>
> >    <assemblyIdentity
> >        type="win32"
> >        name="Microsoft.VC90.CRT"
> >        version="9.0.21022.8"
> >        processorArchitecture="x86"
> >        publicKeyToken="1fc8b3b9a1e18e3b"
> >    />
> >    <file name="msvcr90.dll" /> <file name="msvcp90.dll" /> <file
> > name="msvcm90.dll" />
> > </assembly>
> >
> > Bill
> >
> >
> > > --
> > > Howard Lightstone
> > > how...@eegsoftware.com
> > > _______________________________________________
> > > python-win32 mailing list
> > > python-win32@python.org
> > > http://mail.python.org/mailman/listinfo/python-win32
> >
> >
> I see (having just tried it again) that I seem to have ALSO copied the two
> DLLs to the Pythonwin folder (in site-packages).  I am loading the
> pywintypes25.dll from there but the pythoncom25.dll from the folder where
> python.exe is (as reported by Process Explorer).  I guess (long ago) when I
> was trying to get things working that I copied the DLLs everywhere.

OK, I tried that.  Still doesn't work.  I also checked the manifest in
the pywintypes26.dll to make sure all the numbers matched the Python
VC90.CRT manifest, and they do.  Rebooting the machine doesn't help.

Bill

$ cd /tmp
$ 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.
>>> 
$ cd /c/UpLib/1.7.9/python/
$ find . -name \*.dll
./DLLs/sqlite3.dll
./DLLs/tcl85.dll
./DLLs/tclpip85.dll
./DLLs/tk85.dll
./Lib/site-packages/isapi/PyISAPI_loader.dll
./Lib/site-packages/pythonwin/mfc90.dll
./Lib/site-packages/pythonwin/mfc90u.dll
./Lib/site-packages/pythonwin/mfcm90.dll
./Lib/site-packages/pythonwin/mfcm90u.dll
./Lib/site-packages/pythonwin/pythoncom26.dll
./Lib/site-packages/pythonwin/pywintypes26.dll
./Lib/site-packages/pythonwin/scintilla.dll
./Lib/site-packages/pywin32_system32/pythoncom26.dll
./Lib/site-packages/pywin32_system32/pywintypes26.dll
./Lib/site-packages/win32/perfmondata.dll
./msvcr90.dll
./python26.dll
./pythoncom26.dll
./pywintypes26.dll
./tcl/dde1.3/tcldde13.dll
./tcl/reg1.2/tclreg12.dll
./tcl/tix8.4.3/tix84.dll
$ find . -name \*.manifest
./Lib/site-packages/pythonwin/Microsoft.VC90.MFC.manifest
./Microsoft.VC90.CRT.manifest
$ 
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to