Oracle Instant Client on OS X Raw

Head to [the download page]( (login required since Oracle is terrible) and download these files

Make sure that you get the 64-bit versions (for 64-bit Pythons), else you'll see something like this at import

    ImportError: dlopen(/Users/nikhil/.pyenv/versions/manifold-api/lib/python2.7/site-packages/, 2): Symbol not found: _OCIAttrGet  
      Referenced from: /Users/nikhil/.pyenv/versions/manifold-api/lib/python2.7/site-packages/  
      Expected in: flat namespace

### Easy Way

Uses Homebrew. Copy the files downloaded above to `/Users/$USER/Library/Caches/Homebrew`. Then run [these commands](

brew install InstantClientTap/instantclient/instantclient-basic
brew install InstantClientTap/instantclient/instantclient-sdk
brew install InstantClientTap/instantclient/instantclient-sqlplus

Done! To set up `tnsnames.ora`,

mkdir -p /usr/local/opt/instantclient-basic/network/admin
touch /usr/local/opt/instantclient-basic/network/admin/tnsnames.ora

and add stuff to that file.

### Laborious Way

* Extract the downloaded files at the command line. You'll get a folder called `instantclient_12_2`

* Move it to `/usr/local`

sudo mkdir /usr/local/oracle  
sudo mv instantclient_12_2 /usr/local/oracle/instantclient  
sudo chown user:group /usr/local/oracle

* Set some environment variables

export ORACLE_HOME=/usr/local/oracle/instantclient  
export OCI_INCLUDE_DIR=$OCI_HOME/sdk/include  

* Last steps

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