Python 3.1 cx_Oracle 5.0.2 "ImportError: DLL load failed: Thespecified module could not be found."

Discussion in 'Python' started by André, Nov 19, 2009.

  1. André

    André Guest

    Hello,

    I'm trying to get Python 3.1 and cx_Oracle 5.02
    (cx_Oracle-5.0.2-10g.win32-py3.0.msi) to connect to an Oracle
    11.1.0.7.0 database via OraClient10g 10.2.0.3.0 with Pydev
    1.5.1.1258496115 in Eclipse 20090920-1017 on Windows XP SP 3 v2002.
    The import cx_Oracle line appears as an unresolved import and when I
    run the application I get the following error to console:
    Traceback (most recent call last):
    File "FILEPATHHERE", line 1, in <module>
    import cx_Oracle
    ImportError: DLL load failed: The specified module could not be found.

    Apparently the error is caused by cx_Oracle not being able to find the
    Oracle client DLLs (oci.dll and others). The client home path and the
    client home path bin directory are in the PATH System Variable and
    oci.dll is there.

    I tried getting the Oracle Instant Client (instantclient-basic-
    win32-11.1.0.7.0.zip from http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html)
    and installing it as directed. I added the instant client path to the
    PATH System Variable but that didn't work either.

    I have scoured the internet and have not found a solution.

    Please help!
    André, Nov 19, 2009
    #1
    1. Advertising

  2. André

    Neil Hodgson Guest

    André:

    > Apparently the error is caused by cx_Oracle not being able to find the
    > Oracle client DLLs (oci.dll and others). The client home path and the
    > client home path bin directory are in the PATH System Variable and
    > oci.dll is there.


    Open the cx_Oracle extension with Dependency Walker
    (http://www.dependencywalker.com/) to get a better idea about what the
    problem is in more detail.

    Neil
    Neil Hodgson, Nov 19, 2009
    #2
    1. Advertising

  3. André

    André Guest

    On Nov 19, 6:57 pm, Neil Hodgson <>
    wrote:
    > André:
    >
    > > Apparently the error is caused by cx_Oracle not being able to find the
    > > Oracle client DLLs (oci.dll and others). The client home path and the
    > > client home path bin directory are in the PATH System Variable and
    > > oci.dll is there.

    >
    >    Open the cx_Oracle extension with Dependency Walker
    > (http://www.dependencywalker.com/) to get a better idea about what the
    > problem is in more detail.
    >
    >    Neil


    Thanks Neil. I used Dependency Walker and discovered cx_Oracle was
    looking for python30.dll. I seems to be a known issue with Python 3.1
    http://bugs.python.org/issue4091. I'm now used Python 2.6.4 and the
    corresponding cx_Oracle version with no problems.

    Thanks for the help
    André, Nov 26, 2009
    #3
  4. On Wed, 25 Nov 2009 16:32:36 -0800 (PST), André
    <> declaimed the following in
    gmane.comp.python.general:


    >
    > Thanks Neil. I used Dependency Walker and discovered cx_Oracle was
    > looking for python30.dll. I seems to be a known issue with Python 3.1
    > http://bugs.python.org/issue4091. I'm now used Python 2.6.4 and the
    > corresponding cx_Oracle version with no problems.
    >

    That bug doesn't sound all that much like your problem...

    From the original post

    op>
    op> I'm trying to get Python 3.1 and cx_Oracle 5.02
    op> (cx_Oracle-5.0.2-10g.win32-py3.0.msi) to connect to an Oracle

    Notice: You claim to be using Python 3.1 yet installing a cx_Oracle
    package built (linking against) Python 3.0...

    Which is just what you have discovered -- it was looking for a
    Python DLL you didn't have installed.
    --
    Wulfraed Dennis Lee Bieber KD6MOG
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Nov 26, 2009
    #4
  5. André

    thompjs Guest

    I'm having similar issue but everything seems to be installed in correct
    places.

    Loaded "CX_ORACLE.PYD" at address 0x6BD80000. Successfully hooked module.
    Loaded "OCI.DLL" at address 0x10000000. Successfully hooked module.
    Unloaded "CX_ORACLE.PYD" at address 0x6BD80000.
    Unloaded "OCI.DLL" at address 0x10000000.
    LoadLibraryExA("C:\JSTData\Python27\lib\site-packages\cx_Oracle.pyd",
    0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned NULL. Error: The
    specified procedure could not be found (127).

    Why is cx_Oracle not found after it has been hooked?

    Thanks to anyone that can shed some light on this.
    --
    View this message in context: http://old.nabble.com/Python-3.1-cx...could-not-be-found."-tp26422168p30748079.html
    Sent from the Python - python-list mailing list archive at Nabble.com.
    thompjs, Jan 24, 2011
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Maxim Kuleshov
    Replies:
    1
    Views:
    1,250
  2. =?ISO-8859-15?Q?Bernard_Delm=E9e?=

    python 2.3 + cx_oracle on HP-UX Itanium

    =?ISO-8859-15?Q?Bernard_Delm=E9e?=, May 18, 2005, in forum: Python
    Replies:
    0
    Views:
    424
    =?ISO-8859-15?Q?Bernard_Delm=E9e?=
    May 18, 2005
  3. Replies:
    0
    Views:
    466
  4. Raja

    Python cx_Oracle and Apache

    Raja, Aug 25, 2008, in forum: Python
    Replies:
    3
    Views:
    490
  5. tormod
    Replies:
    3
    Views:
    1,330
    Hans Mulder
    Aug 13, 2010
Loading...

Share This Page