[DB-SIG] cx_Oracle Oracle 10g on Linux

Andy Todd andy47 at halfcooked.com
Wed Apr 28 18:20:32 EDT 2004


Anthony Tuininga wrote:
> On Wed, 2004-04-28 at 10:26, Andy Todd wrote:
> 
>>Hi all,
>>
>>I've just installed Oracle 10g on my Debian box and am now trying to 
>>talk to it from Python.
>>
>>I've downloaded and installed cx_Oracle 4.0.1 but when I try and import 
>>the module I get an error;
>>
>>"""
>>Python 2.3.3 (#2, Feb 24 2004, 09:29:20)
>>[GCC 3.3.3 (Debian)] on linux2
>>Type "help", "copyright", "credits" or "license" for more information.
>> >>> import cx_Oracle
>>Traceback (most recent call last):
>>   File "<stdin>", line 1, in ?
>>ImportError: libclntsh.so.10.1: cannot open shared object file: No such 
>>file or directory
>> >>>
>>"""
>>
>>For the record, Oracle 10g does have a libclntsh.so (in $ORACLE_HOME/lib)
>>
>>I note that Anthony says that the code works on Linux 
>>(http://aspn.activestate.com/ASPN/Mail/Message/db-sig/2011613) so I'm 
>>presuming I am missing some configuration. Does anyone have any suggestions?
> 
> 
> Sure. Did you try building cx_Oracle from source? I did not provide
> binaries for Oracle 10g yet but you should be able to build from source
> without any trouble. If you run into difficulties, send me an e-mail and
> I'll see if I can help you get things going. Now that Oracle has
> released Oracle 10g for Windows as well, the next release of cx_Oracle
> will contain binaries for 10g -- that may be a while yet, though. :-)
> 
> 
>>Regards,
>>Andy

I was building from source. What I hadn't done was set the 
LD_LIBRARY_PATH environment variable correctly. It needs to be set to 
$ORACLE_HOME/lib before starting python and then everything works like a 
charm.

Thanks for your help,
Andy
-- 
--------------------------------------------------------------------------------
 From the desk of Andrew J Todd esq - http://www.halfcooked.com/



More information about the DB-SIG mailing list