Setting up the Python environment for IBM database servers
Before you can connect to an IBM® database server and run SQL statements, you must set up the Python environment by installing the ibm_db (Python) driver and, optionally, the ibm_db_sa (SQLAlchemy) or ibm_db_django (Django) adapter.
Before you begin
Ensure
that the following software is installed on your system:
- Python 2.5 or later. For Linux® operating systems, you also require the python2.5-dev package.
- The setuptools program or the distribute program. The setuptools program is available at http://pypi.python.org/pypi/setuptools, and the distribute program is available at http://pypi.python.org/pypi/distribute. You can use the setuptools program or the distribute program to download, build, install, upgrade, and uninstall Python packages.
- If
your Python application will connect to a remote IBM database, one of the following products on
the computer where your application will run:
- The IBM Data Server Client product
- The IBM Data Server Runtime Client product
- The IBM Data Server Driver Package product
- The IBM Data Server Driver for ODBC and CLI product
Procedure
To set up the Python environment:
What to do next
Test the ibm_db Python driver, the ibm_db_sa SQLAlchemy adapter, and the ibm_db_django Django adapter connection by using the test applications.