python连接oracle,使用cx_Oracle模块,模块版本和客户端版本不对应
python版本3.8 Oracle11 cx_Oracle 8.3
问题一.cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library:
解决一:添加如下代码,指定环境:os.environ['path'] = r'instantclient_10_2路径‘
问题二:cx_Oracle.DatabaseError: DPI-1050: Oracle Client library is at version 10.2 but version 11.2 or higher is needed
解决二:因为我当前使用的是instantclient_10_2,应切换成instantclient_11_2,即添加如下代码:os.environ['path'] = r'instantclient_11_2路径'
1