I'm running ...

SQL*Plus: Release 9.2.X.X.X - Production on Wed Jun 22 13:02:14 2011

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.X.X.X - 64bit Production
With the Partitioning, OLAP and Data Mining options

with Python version 5.7.1

I installed the 32 bit version of cx_Oracle for Oracle 10g however i get

Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
    import cx_Oracle
ImportError: DLL load failed: The specified procedure could not be found.

after i attempt to import.

I checked and my %ORACLE_HOME% Env Variable is placed towards the directory where my Oracle client is installed.

The only issue(s) I'm able to think about would be that the cx_Oracle being designed for Oracle 10g refers back to the client being 10g (where mine is 9) rather than the database (my database is 10g)... or the cx_Oracle module being "32bit" is refering to my remote database being 32bit rather than my local machine. I have done just a little experimenting with various versions with no success.

Thanks.

EDIT:

Also, I am told that Oracle 9 should use some versions of cx_Oracle.. but which of them? I can not find this type of version available. Can there be any work arounds here?

Edit:

I have up-to-date to instantclient 10.2 on my small local machine. Now, however, I'm able to import cx_Oracle all right however when I attempt to create a connection I recieve the next:

Traceback (most recent call last):
  File "C:\oracleTest.py", line 2, in <module>
    connection = cx_Oracle.connect("username/password@(DESCRIPTION STRING)")
DatabaseError: ORA-12705: Cannot access NLS data files or invalid environment specified

Your Oracle client should match the cx_Oracle version. Any reason behind while using Oracle 9 client? You need to have the ability to just download and install the version 10 (as well as 11 client), and matching cx_Oracle version. They'll both use Oracle 10g.

We use Oracle 10g at the office, and that i make use of the 11g client (and corresponding cx_Oracle version).

EDIT: I discovered some older versions of cx_Oracle here: http://sourceforge.net/projects/cx-oracle/files/

...but you might need a mature version of Python (2.6) for those that are for that Oracle 9 client.