Search code examples
python-3.xamazon-rdscx-oracle

AWS RDS oracle python connection


I have launched an RDS Oracle database instance and wanted to connect it using a python code. i did something using cx_oracle but not worked out. Any suggestions/ help would be great !

Thanks in Advance

import cx_Oracle

connstr = 'username/[email protected]:1521/orcl'
conn = cx_Oracle.connect(connstr)

Error message I am getting is:

cx_Oracle.DatabaseError: DPI-1047: 32-bit Oracle Client library cannot be loaded: "The specified module could not be found"


Solution

  • You need to either (a) install the 32-bit Oracle Client libraries or (b) ensure that you are using 64-bit Python and 64-bit cx_Oracle. See the installation instructions for more information.