Note: On Linux and UNIX systems, setuptools has dependencies on the zlib-binand zlib1g-devpackages. These are generally installed on systems;

so ensure that you have them installed. Otherwise, install them using the following commands:

sudo apt-get install zlib-bin sudo apt-get install zlib1g-dev

You can also search for these packages and install them manually.

￿IBM Data Server Driver for CLI support:

All Python extensions communicate to DB2 using CLI. If either IBM Data Server Client or IBM Data Server Runtime Client is present, this step is not required. Otherwise, you require IBM Data Server Driver for ODBC and CLI to run your application. Alternatively, for Windows systems, you can use IBM Data Server Driver for ODBC, CLI, and .NET. Both are described in detail in 4.1.2, “IBM Data Server Driver for ODBC, CLI, and .NET, and IBM Data Server Driver for ODBC and CLI” on page 143.

Note: SQLAlchemy is a prerequisite if you want to install IBM_DB_SA adaptor for SQLAlchemy. SQLAlchemy can be downloaded from:

http://www.sqlalchemy.org/download.html

Installation procedure

You can install IBM_DB driver and IBM_DB_DBI wrapper on Linux, UNIX and Windows systems by issuing the following command:

easy_install ibm_db

To start using IBM_DB_DBI wrapper, add the path where the egg file resides to the environment variable PYTHONPATH. For Linux and UNIX systems:

export PYTHONPATH=<Path where setuptools is installed>/site-packages/ibm_db-xx.egg

Similarly, issue the following command on Windows:

set PYTHONPATH=<Path where setuptools is installed>\site-packages\ibm_db-xx.egg

You can install IBM_DB_SA adaptor on Linux and Windows systems by issuing the following command:

easy_install ibm_db_sa

Chapter 4. Deploying applications with DB2 191

Page 205
Image 205
IBM DB2 manual Installation procedure