【问题标题】:Error while importing cx_Oracle on windows在 Windows 上导入 cx_Oracle 时出错
【发布时间】:2014-11-02 14:31:24
【问题描述】:

我在安装 cx_Oracle 模块时遇到问题。

我已经安装了可以连接到任何 Oracle 服务器的 Oracle Sql developer。我还安装了 cx_oracle 模块。现在,当我尝试导入模块时,我收到了下面提到的错误。

导入 cx_Oracle

Traceback(最近一次调用最后一次):

文件“”,第 1 行,在 导入 cx_Oracle

ImportError: DLL load failed: 找不到指定的模块。

谷歌搜索后,我发现他们要我安装 Oracle 客户端,但由于我已经有可以充当 oracle 客户端的 Oracle Sql 开发人员,所以我无法找到两者之间的区别。谁能帮帮我。

【问题讨论】:

    标签: python-2.7 cx-oracle


    【解决方案1】:

    您需要在本地计算机上安装基于 C 语言的 Oracle“客户端”库。 (SQL Developer 使用 Java 库)。要连接到远程数据库,您可以安装 Oracle Instant Client。

    【讨论】:

      【解决方案2】:

      我已经解释了安装步骤here 用于 32 位操作系统和here 用于 64 位操作系统。

      顺便说一句,您必须将您的 oracle_instant_client 路径添加到您的 PATH 环境变量中。您遇到的错误是因为操作系统没有为 oracle 加载所需的 DLL 文件。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2017-01-06
        • 1970-01-01
        • 2014-02-16
        • 2016-05-18
        • 2017-09-10
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多