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

前端 未结 12 1268
清歌不尽
清歌不尽 2020-12-06 01:11

Here\'s what I did:

  1. I\'m on Windows XP SP3
  2. I already had Python 2.7.1 installed.
  3. I downloaded instantclient-basic-nt-11.2.0.3.0.zip
相关标签:
12条回答
  • 2020-12-06 01:45

    If you're using conda as a package manager, one way to overcome the DLL issue it to install oracle-instantclient by doing a conda install oracle-instantclient. This fixed the dependency which I couldn't fix by manually installing Oracle's instant-client.

    0 讨论(0)
  • 2020-12-06 01:46

    I know this is an old post, but I had this problem today and none of the solutions worked. I figure this could work for others with the same problem as of now.

    Python version : 2.7.15 (64 bits) cx_Oracle version : 6.4.1 Oracle Instant Client : 18.3

    I kept getting the following error even though I followed evry steps in the correct order :

    cx_Oracle.DatabaseError: DPI-1047: Oracle Client library cannot be loaded

    I solved it by downgrading my Oracle Instant Client version to 12.1

    0 讨论(0)
  • 2020-12-06 01:47

    I am using python35 64 bit and oracle express on win 7 (64 bit). I installed cx_Oracle using pip3 (pip3 install cx_Oracle) instead of downloading the installer from pypi.

    I faced the same problem.

    I solved it by following above guidelines, but instead of 32 bit client, I downloaded the 64 bit version of the instant client (instantclient-basic-windows.x64-11.2.0.4.0.zip) from http://www.oracle.com/technetwork/topics/winx64soft-089540.html.

    I then extracted it to c:\oraclexe. And added these environment variables

    set ORACLE_BASE=C:\oraclexe
    set ORACLE_HOME=C:\oraclexe\app\oracle\product\11.2.0\server
    set PATH=C:\oraclexe\instantclient_11_2;%PATH%
    

    And ran my django migrate commands:
    python manage.py migrate

    It worked excellent

    0 讨论(0)
  • 2020-12-06 01:47

    As is the second time I came to this question, I feel the need to post what I did:

    I'm using:

    • Win 8 64 bits
    • Python 2.7

    I had no success installing Python and cx_Oracle 64 bits.

    It only worked when I tried 32 bits versions and followed @rob answer instructions

    0 讨论(0)
  • 2020-12-06 01:52

    Had this issue also, and it seems importing cx_Oracle (at least as of 5.1.2) will fail (with the same error) if you have any invalid/unreachable UNC paths in front of Oracle in the PATH environment variable.

    Fixing the UNC path (which was unrelated to Oracle) resolved the problem.

    0 讨论(0)
  • 2020-12-06 01:53

    I had same issue with DLL load failed on my Windows machine. installed oracle client, set variables, ran cx_Oracle-5.1.3-11g.win32-py2.7.exe file.

    however when I installed cx_Oracle with easy_setup it fixed the problem.

    C:\Python27\Scripts\easy_install.exe cx_Oracle-5.1.3-11g.win32-py2.7.exe
    
    0 讨论(0)
提交回复
热议问题