【发布时间】:2019-03-27 04:51:54
【问题描述】:
我无法使用 python 3/cx_Oracle 连接到我们的企业 Oracle Db。
安装的是:
python 3 -32 bit
cx_Oracle
Oracle Client 12.1.0.2.0
我的连接字符串尝试是:
import cx_Oracle
conn = cx_Oracle.connect(user='user', password='pwd', dsn='working_dsn')
我的 PATH 变量包括我的工作 Oracle 库的直接路径(使用 SQL Dev 工作
错误信息是:
cx_Oracle.DatabaseError: DPI-1050: Oracle Client library is at version 0.0 but must be at version 11.2 or higher
我研究了 Orcale 安装说明,但没有找到连接的方法。我以前尝试过,但没有成功,我重新映像并重新安装了 Oracle,以确保只有一个版本的 Oracle,但仍然没有成功。我需要从 R 迁移到 Python,这是我需要进行切换的最后一块。我可以使用 JDBC driverclass/dbConnect 与 R 连接。
如果 cx_Oracle 不起作用,是否有其他选项可以从 Python3 连接到 Oracle?
有什么想法建议或可以看的地方吗?使用其他连接类型?
提前致谢。
【问题讨论】:
-
我刚试过这个....同样的错误
-
什么平台,你在 Windows 上?
-
是的,抱歉,最初应该这么说
-
您是否也与其他类似的问题进行了比较? stackoverflow.com/… 我明白了 2。抱歉,我不在 Windows 上重现该错误。
标签: python python-3.x windows pyodbc cx-oracle