cx_Oracle 5.0.4 + Python 3.1.2 + Oracle Instant Client 10.2.04; DLL Load failed on import (Win/NT)

tormod tormod.hagen at gmail.com
Wed Aug 11 23:29:24 CEST 2010


Hi,

I've tried countless times to build & install cx_Oracle on Python
3.1.2, and failed every time, so I'd like to ask someone for help.
I've included step-by-step (literally) description of my last try,
with so much detail I could, to help clarify things.

I can build without errors. I can install without errors. I fail to
import.

I'm using an NT box (os:Win7)

Downloaded Oracle Instant Client 10.2.0.4
instantclient-basic-win32-10.2.0.4.zip --> extracted to C:\TEMP
\ORAIC10\bin
instantclient-sdk-win32-10.2.0.4.zip --> extracted to C:\TEMP
\ORAIC10\sdk

Downloaded source code(cx_Oracle-5.0.4.tar.gz) from http://cx-oracle.sourceforge.net/
--> extracted to C:\TEMP\Python\cx_Oracle

Installed Python 3.1.2 --> C:\Python31
Installed MinGW 5.1.6 --> C:\MinGW


Startet command prompt:
cd C:\TEMP\Python\cx_Oracle
PATH=%PATH%;C:\Python31;C:\MinGW\bin;C:\TEMP\ORAIC10\bin
SET ORACLE_HOME=C:\TEMP\ORAIC10
SET LD_LIBRARY_PATH=C:\TEMP\ORAIC10\sdk\lib
python setup.py build -c mingw32
python setup.py install

start python:
Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.


<output from build>
running build
running build_ext
building 'cx_Oracle' extension
creating build
creating build\temp.win32-3.1-10g
creating build\temp.win32-3.1-10g\Release
C:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\TEMP\ORAIC10\sdk
\include -I
C:\Python31\include -IC:\Python31\PC -c cx_Oracle.c -o build
\temp.win32-3.1-10g\
Release\cx_oracle.o -DBUILD_VERSION=5.0.4 -DWITH_UNICODE
writing build\temp.win32-3.1-10g\Release\cx_Oracle.def
creating build\lib.win32-3.1-10g
C:\mingw\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-3.1-10g
\Release\cx_
oracle.o build\temp.win32-3.1-10g\Release\cx_Oracle.def -LC:\TEMP
\ORAIC10\bin -L
C:\TEMP\ORAIC10 -LC:\TEMP\ORAIC10\oci\lib\msvc -LC:\TEMP\ORAIC10\sdk
\lib\msvc -L
C:\Python31\libs -LC:\Python31\PCbuild -loci -lpython31 -lmsvcr90 -o
build\lib.w
in32-3.1-10g\cx_Oracle.pyd
</output build>


<output from install>
running install
running build
running build_ext
running install_lib
copying build\lib.win32-3.1-10g\cx_Oracle.pyd -> C:\Python31\Lib\site-
packages
running install_data
running install_egg_info
Removing C:\Python31\Lib\site-packages\cx_Oracle-5.0.4-py3.1.egg-info
Writing C:\Python31\Lib\site-packages\cx_Oracle-5.0.4-py3.1.egg-info
</output install>

I've opened the cx_Oracle.pyd with Dependency Walker (http://
www.dependencywalker.com/) and DW reports it can't find: OCI.DLL,
PYTHON31.DLL, MSVCR90.DLL (why?)

Appreciate any help, even wildshots and 2 cents are welcome - I'll try
everything.

Cheers,
Tom



More information about the Python-list mailing list