The following procedure documents how to install the sqlanydb module on the supported Unix platforms, including Mac OS X.
Install Python. For a list of supported versions, see http://www.sybase.com/detail?id=1068981.
Install the ctypes module if missing.
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 (bin64 may be used in place of bin32, if you have the 64-bit software installed):
|In this shell ...||... use this command|
|sh, ksh, or bash||. bin32/sa_config.sh|
|csh or tcsh||source bin32/sa_config.csh|
At a shell prompt, change to the sdk/python subdirectory of your SQL Anywhere installation.
Enter the following command to install sqlanydb.
python setup.py install
To test sqlanydb, copy the sample database file to your sdk/python directory and run a test.
cp samples-dir/demo.db . dbeng12 demo python scripts/test.py
The test script makes a connection to the database server and executes a SQL query. If successful, the test displays the message
sqlanydb successfully installed.
If the test does 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.
Discuss this page in DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|