【问题标题】:"DPI-1050: Oracle Client library is at version 10.2 but version 11.2 or higher is needed" Connection Problem with Oracle 10g with Python 3.8“DPI-1050:Oracle 客户端库的版本为 10.2,但需要 11.2 或更高版本”Oracle 10g 与 Python 3.8 的连接问题
【发布时间】: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


    【解决方案1】:

    不知何故,您的机器已设置好,因此首先加载了 10.2 库。如果 PATH 确实没问题,请检查系统目录中可能存在的杂散 oci.dll 文件。

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

    【讨论】:

    • 好的,我已经设置了oracle文件夹的Path变量,现在问题解决了。感谢您的帮助
    猜你喜欢
    • 2023-03-21
    • 2019-02-08
    • 1970-01-01
    • 1970-01-01
    • 2022-08-11
    • 2020-04-28
    • 2015-05-27
    • 1970-01-01
    相关资源
    最近更新 更多