Google

Installing 4Suite on Windows

Mike Olson (Fourthought, Inc.)
Revision (Initial release.) [MO]

1. Abstract
2. Introduction and conventions
3. Installing the prerequisites
3.1. Python 1.5.2
3.2. Python 2.0
3.3. 4ODS and 4RDF persistent backends
3.4. PyXML
4. 4Suite
4.1. 4Suite WISE installer
4.2. 4Suite installation from a zip file
4.3. Testing the install
5. Resources

Abstract

4Suite (TM) is a collection of Python tools for XML processing and object database management. An integrated packaging of components for DOM (in-memory and persistent), XPath, XSLT, RDF, OGMG object databases, XPointer, XLink. This document gives step-by step instructions for installing 4Suite Server.

Introduction and conventions

This introduction covers Windows 98 release 2, but should work for Windows 95, Windows ME, and Windows NT.

Some of the instructions will change the enviroment of the user, you will want to make these permanent by editing the autoexec.bat file. Possible things to add will be mentioned throughout the HOWTO.

Sometimes there will be a great deal of output from an instruction. If there is nothing of particular interest in the output, I'll omit it and replace it with the text "SNIP".

There are many useful third-party resources mentioned in this document. Those that are necessary for you to access in order to follow instructions are directly linked from the text. Others are marked as end notes and the links are available in the Resources section.

Installing the prerequisites

Python 2.0 is recommended for a 4Suite installation. If you are planning on also installing 4Suite Server, or use Zope, then you will need to use Python 1.5.2. Zope still requires Python 1.5.2, and omniORB (a prerequisite for 4Suite Server) does not properly handle unicode strings.

Python 1.5.2

All the installation will be to directories under C:\Program Files\Python

Your system may or may not have Python installed. This instructions will cover installing Python on a machine without Python.

This howto will cover installing Python from the binary distribution. Note, other download locations are available here

      http://www.python.org/ftp/python/win32/py152.exe
    

The Windows installation of Python is a WISE installer executable. Double click on the downloaded file. A welcome screen will appear to make sure that you do want to install Python 1.5.2. Click "next"

The next screen will be to pick the destination directory. I left this as is a just clicked the "next" button. You are free to install this to any location you choose. You will need to note the differences, as the installation of 4Suite will need to know this location.

The component selection screen is where you decide what pieces of Python to install. I left all selected. You may trim them as space requires. The important one is the "Python interperator and library".

Start menu group is where you name this installation in your start menu. I again left this as is. You are free to change the name.

Lastly a confirmation window will appear. If all looks correct press the "next" button to begin the installation

Installation will then commence. In the middle of the installation you will be prompted to install TCL. This is optional. I clicked "No". If all goes well you will get an "Installalation Complete" screen. Click the finish button when you are done. Of course you will prompted to reboot press cancel. We will reboot in a little bit.

Now update your autoexec.bat file to add python to your path. I'm an old school DOS guy so I like to use edit. From a command prompt:

C:\WINDOWS>cd ..

C:\>edit autoexec.bat
    

Add the following line to the file

set path=c:\Progra~1\Python;c:\Progra~1\Python\Scripts;%path%
    

Now you may reboot your machine.

When the machine is back up, test the installation by opening a command prompt. Then do the following:

C:\>python
Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>>
    

If you don't get similar output, your environment is incorrect.

Python 2.0

All the installation will be to directories under C:\Python20

Your system may or may not have Python installed. This instructions will cover installing Python on a machine without Python. If you are not using Python 2.0 it is recommended that you upgrade. 4Suite will work with Python 1.5.2.

This howto will cover installing Python from the binary distribution.

ftp://ftp.sourceforge.net/pub/sourceforge/python/Python-2.0.exe
    

The Windows installation of Python is a WISE installer executable. Double click on the downloaded file. A confirmation screen will appear to make sure that you do want to install Python 2.0. Click "next"

The next screen will be to pick the destination directory. I left this as is a just clicked the "next" button. You are free to install this to any location you choose. You will need to note the differences, as the installation of 4Suite will need to know this location.

The component selection screen is where you decide what pieces of Python to install. I left all selected. You may trim them as space requires. The important one is the "Python interperator and library".

Start menu group is where you name this installation in your start menu. I again left this as is. You are free to change the name.

Lastly a confirmation window will appear. If all looks correct press the "next" button to begin the installation

Installation will then commence. If all goes well you will get an "Installalation Complete" screen. Click the finish button when you are done. Of course you will prompted to reboot press cancel. We will reboot in a little bit.

Now update your autoexec.bat file to add python to your path. I'm an old school DOS guy so I like to use edit. From a command prompt:

C:\WINDOWS>cd ..

C:\>edit autoexec.bat
    

Add the following line to the file

set path=c:\Python20;c:\Python20\scripts;%path%
    

Now you may reboot your machine.

When the machine is back up, test the installation by opening a command prompt. Then do the following:

C:\WINDOWS>python
Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>>
    

If you don't get similar output, your environment is incorrect.

4ODS and 4RDF persistent backends

4ODS and 4RDF are capable of using SQL databases for thier backend storage systems, PostreSQL and Oracle. The python PostgreSQL binding is PyGres and is available here. It will require installation of cygwin to compile. DCOracle has now instructions for building on Windows. Neither have Windows binaries available. Soon 4Suite will ship with a Db-Api adapter, and an ODBC adapter. Until then, windows users will have to use the Dbm drivers for 4RDF and 4ODS. To initialize these adapters you need to define the following environment variables. Paths can be set to any path of choice

set FTODS_DB_DRIVER=Dbm
set FT_DATABASE_DIR=e:\ftods_db
        

PyXML

Current 4Suite works with the Python XML-SIG 0.6.5 installation. This is now a required prerequisite for 4suite. You can download it from:

http://sourceforge.net/project/showfiles.php?group_id=6473
      

For this example, we will assume you downloaded the source package at:

      

Double click on the executable and follw the simple instructions to install

Test the installation

      

4Suite

4Suite is available for Windows download in two formats, a ZIP file of pre-compilied binaries and a WISE installation executable. This howto will walk through both installation processes.

4Suite WISE installer

Download 4Suite-0.10.1 Windows installation executable from:

ftp://ftp.fourthought.com/pub/4Suite/4Suite-0.10.1.win32-py2.0.exe
    

or

ftp://ftp.fourthought.com/pub/4Suite/4Suite-0.10.1.win32-py1.5.exe
    

Double click on the downloaded executable. The first screen is a confirmation that you do indeed want to install 4Suite-0.10.1. Click next

It will then ask you for an installation directory. This should default the the directory you just installed Python into. Once the correct directory is selected, press next

One last screen before installation begins. If all is ready, click the "next" button

It's that simple. Do a quick test to make sure everything is installed correctly. Again open up a command prompt and run (output from a Python 2.0 installation):

C:\WINDOWS>python
Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> print Processor
>>>
    

If you don't get something similar then you probably have a problem.

There is a section on doing a full 4Suite test after the other intallation instructions.

4Suite installation from a zip file

Download 4Suite-0.10.1 Windows binary installation zip from:

ftp://ftp.fourthought.com/pub/4Suite/4Suite-0.10.1.win32-py2.0.zip
    

or if you have Python 1.5.2

ftp://ftp.fourthought.com/pub/4Suite/4Suite-0.10.1.win32-py1.5.zip
    

Unzip the tar. Note, for Python 2.0 The paths of the files in the ZIP start with PYTHON20, so unzip it into the directory above you Python 2.0 installation. In this example, I unzipped to C:\

Note, the 4Suite installation does overwrite some files in the Python 2.0 distribution. When prompted to overwrite, click "Yes To All"

It's that simple. Do a quick test to make sure everything is installed correctly. Again open up a command prompt and run:

C:\WINDOWS>python
Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> print Processor
>>>
    

If you don't get something similar then you probably have a problem.

There is a section on doing a full 4Suite test after the other intallation instructions.

Testing the install

4XSLT exercises a good deal of 4Suite, so a good test is:

C:\WINDOWS>cd \Python20\doc\4Suite-0.10.1\test_suite\4XSLT

C:\Python20\Doc\4Suite-0.10.1\test_suite\4XSLT>python test.py --quick
    

or for a Python 1.5.2 installation

C:\WINDOWS>cd \Progra~1\Python\doc\4Suite-0.10.1\test_suite\4XSLT

C:\Progra~1\Python\Doc\4Suite-0.10.1\test_suite\4XSLT>python test.py --quick
    

You may get a few warnings about test files being omitted, but as long as you don't get any error messages or failure reports, All should be well.

Resources

Here is more information about the various packages we have introduced in the 4Suite setup. All excellent open-source software.