"DPI-1050。Oracle客户端库处于10.2版本,但需要11.2或更高版本 "与Oracle 10g和Python 3.8的连接问题。

问题描述 投票:0回答:1

我正试图用Python连接Oracle 10g数据库,我按照网站上的这些说明进行操作。https:/cx-oracle.readthedocs.ioenlatestuser_guideinstallation.html。 我使用的是 -Oracle 10g express edition 10.2 -Python 3.8.3 -Oracle Instant Client vs. 12.1 我也试过用其他版本的oracle即时客户端,从19.1到9.1。

我的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
1个回答
0
投票

不知为何,你的机器被设置为先加载10.2库。 如果PATH真的没问题,请检查系统目录中是否有杂散的occi.dll文件。

另外,还有一个18c版本的Express Edition可用。

© www.soinside.com 2019 - 2024. All rights reserved.