I am trying to set up cx_Oracle to work with Python.
I am using
- Python 2.7.10, 64-bit
cx_Oracleversion 6.0.2- MacOS Sierra 10.12.6
I set the following environment variables:
export ORACLE_HOME="/Volumes/DATA/Programs/PY/instantclient_12_1"
export DYLD_LIBRARY_PATH="$ORACLE_HOME:$DYLD_LIBRARY_PATH"
export LD_LIBRARY_PATH=$ORACLE_HOME
export PATH=$PATH:$ORACLE_HOME
export ORACLE_SID=edocd
export TNS_ADMIN=/Volumes/DATA/Programs/PY/instantclient_12_1/network/admin
export TWO_TASK=${ORACLE_SID}
Here is what I tried:
- Installed as Administrator
sudo python setup.py buildsudo python setup.py install
When I tried to execute a simple script to check the Oracle connection I was able to connect successfully via sqlplus.
Here is the error I receive:
cx_Oracle.DatabaseError: DPI-1047: 64-bit Oracle Client library cannot be loaded: "dlopen(libclntsh.dylib, 1): image not found". See https://oracle.github.io/odpi/doc/installation.html#macos for help