cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: “libclntsh.so: cannot open shared object file: No such file or directory”

Error:

[oracle@hydrupgrd ~]$ python3 plot_RT.py
Traceback (most recent call last):
  File "plot_RT.py", line 14, in <module>
    encoding="UTF-8")
cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory". See https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html for help

Solution:

[oracle@hydrupgrd ~]$ export LD_LIBRARY_PATH=/u01/app/oracle/product/12.1.0/dbhome_3/lib
[oracle@hydrupgrd ~]$ python3 plot_RT.py
Traceback (most recent call last):
  File "plot_RT.py", line 37, in <module>
    dbcur.execute(query)
cx_Oracle.DatabaseError: ORA-00900: invalid SQL statement

Leave a Reply