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

A

André

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!
 
N

Neil Hodgson

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
 
A

André

André:


   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
 
D

Dennis Lee Bieber

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.
 
T

thompjs

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top