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

> 
> On Mon, Apr 19, 2010 at 3:40 PM, Bill Janssen <jans...@parc.com> wrote:
> 
> > Bill Janssen <jans...@parc.com> wrote:
> >
> > > Mark Hammond <mhamm...@skippinet.com.au> wrote:
> > >
> > > > On 8/04/2010 12:05 PM, Bill Janssen wrote:
> > > > > 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:
> > > >
> > > > Does it work when you install "just for me" and then run the standard
> > > > pywin32 installer?  If so, I guess it at least proves it can be made
> > > > to work if we chant the correct spells and gives you a baseline to
> > > > judge your process against...
> > >
> > > Just tried this.  The PyWin32 post-install script fails:
> > >
> > > $ cat /tmp/pywin32_postinstall.log
> > > Traceback (most recent call last):
> > >   File "<string>", line 601, in <module>
> > >   File "<string>", line 311, in install
> > >   File "<string>", line 149, in LoadSystemModule
> > > ImportError: DLL load failed: This application has failed to start
> > because the application configuration is incorrect. Reinstalling the
> > application may fix this problem.
> > >
> > > And, if I copy the pywin32 dlls by hand to the right spot, it fails just
> > > like it did before.
> > >
> > > Bill
> >
> > Mark, I've worked through my other issues, and am ready to get back to
> > this one when you have time to look at it.  Just to recap:
> >
> > I'm trying to create an MSI installer for UpLib on Windows that will
> > include both a private copy of Python and an as-private-as-possible copy
> > of PyWin32.  Right now, if I install Python privately ("just for me", and
> > no entries in the registry), I can't get PyWin32 to install or work with
> > it.
> >
> > Bill
> > _______________________________________________
> > python-win32 mailing list
> > python-win32@python.org
> > http://mail.python.org/mailman/listinfo/python-win32
> >
> >
> 
> 
> -- 
> Howard Lightstone
> how...@eegsoftware.com
> _______________________________________________
> python-win32 mailing list
> python-win32@python.org
> http://mail.python.org/mailman/listinfo/python-win32
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to