I tried connecting to oracle using cx_oracle in python but getting an error.
Tried this:
I even formatted my machine and updated java version.
Amazon Python 2.7 Lambda: DPI-1047: 64-bit Oracle Client library cannot be loaded: "libclntsh.so" but still did not work.
Versions Used : python 3.7, Anaconda 3.7
import cx_Oracle
connect_string = 'Username/password@hostname:port/sid'
connection = cx_Oracle.connect(connect_string)
cursor = connection.cursor()
cursor.execute("Select * from table_name")
for rows in cursor:
print(rows)
Error : 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