[Zope] Python Packages and Zope windows binary install

Passin, Tom tpassin at mitretek.org
Wed Nov 17 15:17:59 EST 2004


> From: zope-bounces at zope.org [mailto:zope-bounces at zope.org] On Behalf
Of
> Tino Wildenhain
> Am Mittwoch, den 17.11.2004, 14:31 -0500 schrieb Will Smith:
> > I need to run zope on windows.  The binary installs fine, but it
creates
> > its own installation of python.  What is the best method to install
> > python packages to zope's python installation.
> >
> > Currently, I have Zope-2.7.2 and python 2.3.3 installed.  I have
been
> > using windows installers to install packages (dav, libxml2, mx,
> > python-mysql) into my dedicated python installation.  I tried
hacking
> > around in the registry to get the installers to see Zopes python,
but no
> > luck :(.  At this point I have been just copying the files from my
> > dedicated python/site-packages directory over to my
> > zope-python/site-packages directory.
> >

> You can use system python (if same version) with Zope very well.
> Just change the occurences of python.exe to your system python.
> Another trick would be to install Zope and then install
> a windows python over it.


I was able to do this by changing the name of the Zope python
installation to match a corresponding regular python installation
(temporarily rename it first), then changing the name back afterwards.
This fools the package installers, at least the ones that check the
Windows registry for the python location.

However, in many cases you only need to copy the directories that were
installed in some other python installation - but make SURE to delete
all *.pyc and *.pyo files when you do that, since they seem to contain
path information that will now be wrong.

You may also need to get the new locations into the python path, and the
easiest way to do that is to put them into a .pth file.  Put the file
into the same directory as the Zope python executable.

Cheers,

Tom P



More information about the Zope mailing list