如何修复cx_Oracle:DLL加载失败? [英] How to fix cx_Oracle: DLL load failed?

查看:128
本文介绍了如何修复cx_Oracle:DLL加载失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经历了许多相关的问题,这使我想知道为什么这是一个如此普遍的问题?无论如何,我试图使用 cx_Oracle模块

There are so many related questions that I have gone through which made me wonder how come this is such a prevalent issue? Anyways, I am trying to use cx_Oracle module.

我有:

instant client: instantclient-basic-win32-11.1.0.6.0.zip 
python - 3.4
cx_Oracle - cx_Oracle-5.2-11g.win32-py3.4.exe 

我已经设置了Path以及ORACLE_HOME变量。为什么我仍然收到此错误?

I have set up Path as well as the ORACLE_HOME variables. Why is that I still get this error?

编辑:我尝试再次安装cx_oracle,但这一次是通过setup.py上的install命令而不是.exe进行的。我收到错误 distutils.errors.DistutilsSetupError:无法在C:\oracle\client

Edit: I tried installing cx_oracle again, but this time through install command on the setup.py instead of the .exe. I got an error distutils.errors.DistutilsSetupError: cannot locate Oracle include files in C:\oracle\client

C:\Oracle\Client 是我的即时客户端所在的位置,也是我的路径和 Oracle_Home指向的位置。知道如何克服这个问题吗?

C:\Oracle\Client is where my instant client resides that's where my path and Oracle_Home point to. Any idea how to overcome this problem?

推荐答案

好吧,我想出了解决方法。

Well, I figured out how to fix it.


  1. 我拥有的Oracle Instant Client版本应为 instantclient-basic-nt-11.2.0.4.0.zip

  2. 根本不需要Oracle Home

  3. 在path变量中提及即时客户端的路径时,如果有其他Oracle,它应该是最后一个客户端已经在机器中可用了。

一旦我修复了这些问题,它就像一个魅力!

Once I fixed these, it just worked like a charm!

这篇关于如何修复cx_Oracle:DLL加载失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆