1

I am 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 2.7.1

I installed the 32 bit version of cx_Oracle for Oracle 10g but 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.

when I try to import.

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

The only problem(s) I can think of is that the cx_Oracle being made for Oracle 10g refers to the client being 10g (where mine is 9) instead of the database (my database is 10g)... or that the cx_Oracle module being "32bit" is refering to my remote database being 32bit instead of my local machine. I've done a little playing around with different versions to no avail.

Thanks.

EDIT:

Also, I'm told that Oracle 9 should work with some versions of cx_Oracle.. but which ones? I can't find such a version available. Is there any work arounds here?

Edit:

I've updated to instantclient 10.2 on my local machine. Now, however, I can import cx_Oracle just fine but when I try to make a connection I get the following:

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
asked Jun 22, 2011 at 17:49
1
  • just like to confirm you're running 32bit python with the 32bit cx_Oracle client. Commented Jun 22, 2011 at 17:55

1 Answer 1

1

Your Oracle client should match the cx_Oracle version. Any reason for using the Oracle 9 client? You should be able to just download and install the version 10 (or even 11 client), and matching cx_Oracle version. They will both work with Oracle 10g.

We use Oracle 10g at work, and I use the 11g client (and corresponding cx_Oracle version).

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

...but you may need an older version of Python (2.6) for the ones that are for the Oracle 9 client.

answered Jun 22, 2011 at 18:34
Sign up to request clarification or add additional context in comments.

3 Comments

I've heard that early releases of 10 don't actually work with cx_Oracle package. Know anything about this? I could, potentially, get the newer version but it would involve modification to a number of systems and I was just hoping for another solution.
@DKGasser: "select banner from v$version"...we're running 10.2.0.4.0 64 bit & cx_Oracle works fine with it...do you have any links to it not working?
after a quick google search this one shows up, though it wasn't the original one where I saw mention of the 'phenomenon' forums.oracle.com/forums/…

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.