【发布时间】:2020-06-12 18:17:06
【问题描述】:
我正在尝试借助 Python 连接 Oracle 10g 数据库
我正在遵循网站上的这些说明:
https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html
我正在使用-Oracle 10g express edition 10.2
-Python 3.8.3
-Oracle Instant Client vs. 12.1
我还尝试过从 19.1 到 9.1 的其他版本的 oracle 即时客户端
我的 Python 脚本是:-
import cx_Oracle
con = cx_Oracle.connect('Shubho/Shubho@//localhost:1521/orcl')
print(con.version)
con.close()
但是在上面的脚本中我得到了这个错误:
cx_Oracle.DatabaseError: DPI-1050: Oracle Client library is at version 10.2 but version 11.2 or higher is needed
我将路径设置为:
C:\Users\Anonymous\Desktop\instantclient-basic-nt-12.1.0.2.0\instantclient_12_1
C:\Users\Anonymous\AppData\Local\Programs\Python\Python38-32
【问题讨论】:
标签: cx-oracle