【发布时间】:2018-06-11 15:38:30
【问题描述】:
我正在尝试使用 oracle 12c 作为我使用 Django 框架的应用程序的数据库。但我对版本相关问题感到震惊
以下是使用的库版本:
- Python 3.6
- cx_Oracle 6
- Oracle 即时客户端 12.2
- 服务器上的 Oracle 12 C 数据库
- cx_oracle 所在的本地计算机上的 Oracle 10 g 已安装
操作系统是 windows 7
以下是我安装 cx_oracle 的步骤
- pip install cx_Oracle
- 下载适用于 Windows 的 Oracle Instant Client 12.2 zip 文件
- 解压压缩文件
- 将上述解压后的文件夹添加到用户 PATH 变量中
从 CMD 我尝试执行
python
import cx_Oracle
con = cx_Oracle.connect(uname, pwd, server_ip:port/name)
我收到错误:
cx_oracle.databaseerror: dpi-1050: oracle 客户端库必须是 11.2 或更高版本
cx_Oracle 是否与本地机器上安装的 oracle 10g 有任何冲突 我无法升级本地 oracle 10g db,因为(未授予权限)
如何解决上述问题。 如何确保 cx_Oracle 使用正确的 Oracle 即时客户端(即 12.2)连接到服务器数据库。
【问题讨论】:
标签: django oracle python-3.x oracle12c cx-oracle