Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install ox_oracle on Mac (Yosemite)

ox_Oracle is a python module that allows developers to connet to Oracle Database. Although The installation process is messy process, we'll try to make it simple for you.


Create a directory /usr/lib/share/oracle Download the necessary zip files from here:

  • instantclient-basic-macosx
  • instantclient-sdk-macosx

Unzip both files at the same location, /usr/lib/share/oracle

All the files is uncompressed in dicrectroy instantclient_11_2, sdk should be unzipped in a subdirectory.

For ease of use, set $ORACLE_HOME to this directory:

export ORACLE_HOME=/usr/lib/share/oracle/instantclient_11_2

Create a symlink to you SO file. (Note: Make sure the version number might be different.)

ln -s libclntsh.dylib.11.1 libclntsh.dylib
ln -s libocci.dylib.11.1 libocci.dylib

Update path:


Finally, install cx_oracle with pip:

pip install cx_oracle



Installing cx_Oracle for Python/ Mac OSX. Retrieved from

Installing python cx_oracle on Ubuntu. Retrieved from

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.