This discussion is archived
4 Replies Latest reply: Feb 1, 2012 7:31 PM by sun1991 RSS

cx_Oracle DLL load failed

744756 Newbie
Currently Being Moderated

I'm struggling with an error "ImportError: DLL load failed: The specified procedure could not be found." when I call import cx_Oracle from python command prompt. I'm using python 3.0 and oracle 11g, for this I installed cx_Oracle 5.0.2( also tried 5.0.1, 5.0, etc) but still getting the same issue.

I don't understand this problem, I have tried all versions in python too, but no use. Could someone help on this isse please.
  • 1. Re: cx_Oracle DLL load failed
    651761 Newbie
    Currently Being Moderated
    Have you installed Oracle 11g Client?
  • 2. Re: cx_Oracle DLL load failed
    776009 Newbie
    Currently Being Moderated
    this workarround is functional on windows with cx_oracle2.5.4 and Oracle 10g.

    1.Dentro de la siguiente carpeta {C:\Python25}\Lib\site-packages ({C:\Python25} puede cambiar dependiendo de donde se realizó la instalación). Copiaremos el archivo cx_Oracle.pyd y lo pegamos en la carpeta {C:\Python25}\DLLs
    2.El contenido del archivo oracleForPython.rar (this a set of files of Oracle InstantClient) se extraerá en la carpeta {C:\Python25}\DLLs de la instalación de python.
    3.Posterior a ello la biblioteca de cx_Oracle y las librerías dependientes ya se tendrán instaladas en nuestro PYTHON_PATH respectivo, podremos comprobar que funciona correctamente con el siguiente comando en la consola de cmd:
    a.Cmd <--[INTRO]
    b.PROMPT> Python <-- [INTRO]
    c.>> import cx_Oracle <-- [INTRO]
    d.En este ultimo comando no deberemos de recibir el mensaje de error descrito anteriormente.
  • 3. Re: cx_Oracle DLL load failed
    783174 Newbie
    Currently Being Moderated
    Hi I am new to this python and Oracle. I am also encountering the same error.
    I wish to connect to a database located on another machine using python from my machine. I dont have Oracle installed on my system but it is there on that remote machine.

    I am also encountering the same error.

    Right now I am using Oracle SQLdeveloper to connect to that database . But I wish to do the same using a python script.

    Can you please help me with this error .

    I have :-

    python :- 2.6.5


    Error which I encounter :-
    import cx_Oracle

    Traceback (most recent call last):
    File "<pyshell#1>", line 1, in <module>
    import cx_Oracle
    ImportError: DLL load failed: The specified procedure could not be found.
  • 4. Re: cx_Oracle DLL load failed
    sun1991 Newbie
    Currently Being Moderated
    Suppose you are using windows OS:
    Check your environment variable, make sure Path contains something like "D:\oracle\product\10.2.0\db_1\bin;", and your cx_Oracle matches Oracle 10g.


  • Correct Answers - 10 points
  • Helpful Answers - 5 points