gpt4 book ai didi

python - cx_Oracle : ImportError: DLL load failed: This application has failed

转载 作者:IT老高 更新时间:2023-10-28 21:16:54 28 4
gpt4 key购买 nike

这就是我所做的:

  1. 我使用的是 Windows XP SP3
  2. 我已经安装了 Python 2.7.1。
  3. 我下载了instantclient-basic-nt-11.2.0.3.0.zip,解压后放入C:\Program Files\Oracle\instantclient_11_2
  4. 我将此路径添加到 Windows Path 环境变量中。
  5. 我创建了一个新的环境变量 ORACLE_HOME 保存这个路径作为它的值。
  6. 我安装了cx_Oracle-5.1.2-11g.win32-py2.7.msi

在运行 import cx_Oracle 我得到的只是

Traceback (most recent call last): 
File "<string>", line 2, in <module>
ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

我显然卸载/重新安装了 cx_Oracle 几次,但似乎没有任何帮助。谁能提供线索如何解决这个问题?

更新

我运行了 Dependency Walker,但遇到了很多麻烦。但是,第一个丢失的 .dll (msvcr80.dll) 实际上存在C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.91_x-ww_0de56c07 中。

enter image description here

最佳答案

好的,最终解决问题的是什么(不确定是否所有步骤都是必要的,也不知道为什么这样做,到目前为止只有这样有效):

  • here 下载并解压缩 版本 12 .
  • 将“ORACLE_HOME”添加为 Windows 环境变量,并将其值设置为 ...\instantclient_12_1,(不是其包含的文件夹!)。
  • 将此相同路径添加到“Path”环境变量。
  • 现在才安装cx_Oracle .

关于python - cx_Oracle : ImportError: DLL load failed: This application has failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20159566/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com