oracle - 无法在 python "ImportError: DLL load failed: The specified procedure could not be found."中导入 cx_Oracle

标签 oracle python-2.7 cx-oracle

这两天我一直在尝试使用 cx_Oracle。我想从 python 连接到 oracle。但我收到“ImportError:DLL 加载失败:找不到指定的过程。”错误。我已经浏览了很多帖子并尝试了其中建议的内容,但没有任何帮助。

我按照很多帖子的建议检查了 Windows、Python、Oracle 客户端的版本,但它们对我来说都不错。

Python 版本 2.7:64 位

Python 2.7.8(默认,2014 年 6 月 30 日,16:08:48)[MSC v.1500 64 位 (AMD64)] on win 32

Windows 7:64 位

Oracle 客户端是 11.2.0: 64 位

我运行了 Sqlplus 并检查了任务管理器以确认这一点。因为我的系统上同时安装了 32 位和 64 位客户端,但 PATH 变量中设置了 64 位。

请帮我解决这个问题。如果需要任何其他信息,请告诉我。

最佳答案

我能够解决它。我之前安装了错误版本的 cx_Oracle。它适用于 12c oracle 客户端。我稍后安装了 11g 版本,它开始为我工作。

注意:无需设置ORACLE_HOME环境变量。

Oracle 客户端、Python、Windows 操作系统都必须具有相同的体系结构。 32 位或 64 位。

关于oracle - 无法在 python "ImportError: DLL load failed: The specified procedure could not be found."中导入 cx_Oracle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32561547/

相关文章:

mysql - 升级 django 时出现 django.db.migrations.exceptions.NodeNotFoundError

python - 查找 float 中小数点后的数字总和,直到任意精度

python - 如何制作一个可以从任何目录 : the script file doesn’t have to be in the same directory as the . csv 文件运行的 python 脚本?

python - 无响应的请求 - 了解瓶颈(Flask + Oracle + Gunicorn)

oracle - 在快速刷新物化 View 中使用非确定性函数真的被禁止吗?

sql - 如何最好地重新创建 Oracle 数据库?

sql - Oracle如何为多个列获取一个列中最常见的值?

oracle - 为什么 Oracle SELECT INTO 语句会抛出错误?

python - Linux profile.d 环境变量不适用于 Python 中的 cx_oracle

python - 按名称而不是在 cx_Oracle 中的位置获取列值