How to fix cx_Oracle: DLL load failed?

混江龙づ霸主 提交于 2020-01-07 03:06:20

问题


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.

I have the :

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 

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

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 is where my instant client resides that's where my path and Oracle_Home point to. Any idea how to overcome this problem?


回答1:


Well, I figured out how to fix it.

  1. The Oracle Instant Client version I had should be instantclient-basic-nt-11.2.0.4.0.zip
  2. Oracle Home is not needed at all
  3. When mentioning the path of instant client in the path variable, it should be the last if any other oracle client is already available in the machine.

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



来源:https://stackoverflow.com/questions/31134947/how-to-fix-cx-oracle-dll-load-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!