Did you try to establish how you connected? It looks like you configured it correctly.
Try the following (fill in your personal information):
ip_addr = 'ip address'
port = 1521
sid = 'sid'
dsn_tns = cx_Oracle.makedsn(ip_addr, port, sid)
db = cx_Oracle.connect('username', 'password', dsn_tns)
If this does not work, make sure yours is LD_LIBRARY_PATH
installed correctly.
source
share