Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere Python Database support


Installing sqlanydb on Unix and Mac OS X

The following procedure documents how to install the sqlanydb module on the supported Unix platforms, including Mac OS X.

To prepare your computer
  1. Install Python 2.4 or later.

  2. Install the ctypes module if missing.

To install the sqlanydb module on Unix and Mac OS X
  1. Make sure the environment is set up for SQL Anywhere.

    Depending on which shell you are using, enter the appropriate command to source the SQL Anywhere configuration script from the SQL Anywhere installation directory:

    In this shell ... ... use this command
    sh, ksh, or bash . bin/
    csh or tcsh source bin/sa_config.csh
  2. At a shell prompt, change to the sdk/python subdirectory of your SQL Anywhere installation.

  3. Enter the following command to install sqlanydb.

    python install
  4. To test sqlanydb, copy the sample database file to your sdk/python directory and run a test.

    cp samples-dir/demo.db .
    dbeng11 demo
    python scripts/

    If the tests do not run, ensure that the bin32 or bin64 subdirectory of the SQL Anywhere installation is in your path.

The sqlanydb module is now ready to use.