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

前端 未结 12 1313
清歌不尽
清歌不尽 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: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

提交回复
热议问题