Connect to Remote Oracle DB via Python: DPI-1047: 64-bit Oracle Client library cannot be loaded

0

Summary: I am having trouble connecting to a remote Oracle database via the Python library, cx_oracle.

Error: DPI-1047: Cannot locate a 64-bit Oracle Client library:
"C:\Oracle\product\11.2.0\client_1\bin\oci.dll is not the correct architecture"

Python Version: 3.7 64 bit through Anaconda
Oracle Version: 11.2 client, 64-bit
System Path Added: C:\Oracle\product\11.2.0\client_1\bin\OCI.dll
MS Visual C++ 2005 Redistributable is installed
MS Visual C++ 2005 Redistributable (x64) is installed

Python Code:

import cx_Oracle
username = xyz123
password = pword123
host = xxxxx
path = xxxx
servicename = 'xxxx'
dsn_tns = cx_Oracle.makedsn(host, path, service_name=servicename)
conn = cx_Oracle.connect(user=username, password= password, dsn=dsn_tns)

Steven Finkelstein

Posted 2019-07-03T19:07:20.667

Reputation: 1

No answers