The forum will be unavailable for maintenance at some point from Friday, April 13 at 19:00 EDT until Sunday, April 15 at 23:59 EDT. Downtime will be minimized but the exact timing is unknown.

I installed SQL Anywhere 16. How to solve the following issue?

$ cat ~/.bashrc 
export SQLANYWHERE_HOME=/Applications/SQLAnywhere16/System

$ python3

Python 3.3.5 (v3.3.5:62cf4e77f785, Mar  9 2014, 01:12:57) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlanydb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "./", line 469, in <module>
    class Connection(object):
  File "./", line 471, in Connection
    def __init__(self, args, kwargs, parent = Root("PYTHON")):
  File "./", line 422, in __init__
  File "./", line 416, in load_library
    raise InterfaceError("Could not load dbcapi.  Tried: " + ','.join(names))
sqlanydb.InterfaceError: Could not load dbcapi.  Tried: dbcapi.dll,,libdbcapi_r.dylib

asked 16 Dec '14, 16:17

denpetrov's gravatar image

accept rate: 0%

This is because sqlanydb is looking for the 32-bit version of dbcapi.dll which is not installed if you've only installed the 64-bit version of SQLAny. Try reinstalling and selecting both versions.

permanent link

answered 17 Dec '14, 03:06

Mike%20Killey's gravatar image

Mike Killey
accept rate: 60%

Mike, thanks. I re-installed (run from /Applications/SQLAnywhere16/), but it doesn't work. My system is Mac OS X 10.10.

(17 Dec '14, 04:40) denpetrov

Have you sourced the file, which will be in:


or somewhere similar to that?

(17 Dec '14, 04:57) Mike Killey

$ cd /Applications/SQLAnywhere16/System/bin32/

$ pwd


$ chmod +x

$ ./

It does not show any message. What should be in the output?

(17 Dec '14, 05:40) denpetrov

I'm not near a 'nix box at the moment, but I don't think there should be any output. What happens now if you try to import sqlanydb in the Python REPL?

(17 Dec '14, 06:14) Mike Killey
Comment Text Removed
Comment Text Removed
Comment Text Removed

$ chmod +x

$ ./

You can't execute it this way; this creates a new shell (environment), sets a bunch of environment variables, and then drops the environment, and so it has no effect. Use ". <path>/". Note the space after the dot. This sets the environment variables in the current shell.

permanent link

answered 17 Dec '14, 06:48

Graeme%20Perrow's gravatar image

Graeme Perrow
accept rate: 52%

converted 16 Feb '16, 15:22

Nick%20Elson%20SAP%20SQL%20Anywhere's gravatar image

Nick Elson S...


$ . /Applications/SQLAnywhere16/System/bin32/

It seems to work. Mike and Graeme, thanks!

(17 Dec '14, 07:20) denpetrov

I have the same problem. I have sourced that .sh file and both 32 and 64 bit are installed and available in the path. Though it doesn't work. Any ideas? Mac os X 10.10

permanent link

answered 12 Feb '15, 18:39

Memento's gravatar image

accept rate: 0%

Did you execute the command in the way Graeme Perrow proposed?

(12 Feb '15, 19:46) denpetrov
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 16 Dec '14, 16:17

question was seen: 4,368 times

last updated: 12 Feb '15, 19:46