【问题标题】:Trying to connect a DB : Win7 Enterprise 64bit- Python cx_Oracle - oci.dll is not found尝试连接数据库:Win7 Enterprise 64bit- Python cx_Oracle - oci.dll is not found
【发布时间】:2018-09-15 10:32:56
【问题描述】:

python 3.6 64 位,Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production,cx_oracle 6.4.1

能够通过 sqlplus 和 sql developer 手动连接数据库。

尝试通过 python 连接时:

cx_Oracle.DatabaseError: DPI-1047: 64-bit Oracle Client library cannot be loaded: "C:\Oracle\product\11.2.0\client_1\bin\oci.dll is not the correct architecture" ....

手动验证 “C:\Oracle\product\11.2.0\client_1\BIN\”有oci.dll

请帮忙

【问题讨论】:

  • 你可能安装的是32位版本??尝试安装 64 位版本
  • 您不能从 64 位可执行文件调用 32 位 DLL。如果您尝试,您只会收到一条错误消息。此错误消息是我见过的最明确的错误消息之一。大多数情况下,它们是找不到文件无法加载
  • 两者都是 64 位..我检查过

标签: python cx-oracle


【解决方案1】:

位于 C:\Oracle\product\11.2\client_1\bin\oci.dll 的 DLL 不是 64 位 DLL。您需要下载并解压 64 位 Oracle Instant Client 才能解决此问题。请注意,在这种情况下,服务器是 64 位的这一事实与此无关。客户端必须是 64 位的!

【讨论】:

  • Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production 是我拥有的版本
  • 检查错误消息中提到的位置的 DLL 并确保是您安装的那个。您可能有多个版本。也许是数据库版本和客户端版本?
猜你喜欢
  • 2021-10-04
  • 2020-01-11
  • 1970-01-01
  • 2021-09-27
  • 2020-02-06
  • 2022-07-08
  • 2021-02-02
  • 2020-08-10
  • 1970-01-01
相关资源
最近更新 更多