Connecting Oracle8i to Python

Discussion in 'Python' started by the_rev_dharma_roadkill, Jul 17, 2003.

  1. Hello,
    I'm a newbie to Python. In order to get much use out of it at my
    site, I must be able to connect it to Oracle8i databases. I'm running
    Python 2.2.2 on Tru64 (osf1 V5.1a).

    First question:
    What do you recommend?
    DCOracle2? Note that I am not running Zope or any other web software.
    cx_Oracle?
    Other?

    Second question (important only if you recommend DCOracle2)
    I can "make" DCOracle2, but I don't see any hints anywhere on how to
    install it on a non-zope system. If I try any obvious thing, like cp
    -r to lib/python2.2/site-packages, at BEST I get:

    > python

    Python 2.2.2 (#1, May 9 2003, 14:15:51) [C] on osf1V5
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import DCOracle2

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "DCOracle2/__init__.py", line 37, in ?
    from DCOracle2 import *
    File "DCOracle2/DCOracle2.py", line 104, in ?
    import dco2
    ImportError: dlopen: DCOracle2/dco2.so: symbol "OCILobIsTemporary"
    unresolved

    What is going on here?
    I think that OCILobIsTemporary is supposed to be in the Oracle8i
    client shared library, so maybe that library isn't getting loaded.
    What am I doing wrong? I've tried playing with
    LD_LIBRARY_PATH=$ORACLE_HOME/lib but nothing seems to work. I've even
    forced src/Makefile to include -rpath $ORACLE_HOME/lib .

    I should point out that I have other non-python apps that can use the
    oracle client library just fine, and
    > nm libclntsh.so | grep OCILobIsTemporary

    OCILobIsTemporary | 0004396966856416 | T |
    0000000000000008

    Doug
     
    the_rev_dharma_roadkill, Jul 17, 2003
    #1
    1. Advertising

  2. (the_rev_dharma_roadkill) wrote in message news:<>...
    > Hello,
    > I'm a newbie to Python. In order to get much use out of it at my
    > site, I must be able to connect it to Oracle8i databases. I'm running
    > Python 2.2.2 on Tru64 (osf1 V5.1a).
    >
    > First question:
    > What do you recommend?
    > DCOracle2? Note that I am not running Zope or any other web software.
    > cx_Oracle?
    > Other?
    >
    > Second question (important only if you recommend DCOracle2)
    > I can "make" DCOracle2, but I don't see any hints anywhere on how to
    > install it on a non-zope system. If I try any obvious thing, like cp
    > -r to lib/python2.2/site-packages, at BEST I get:
    >
    > > python

    > Python 2.2.2 (#1, May 9 2003, 14:15:51) [C] on osf1V5
    > Type "help", "copyright", "credits" or "license" for more information.
    > >>> import DCOracle2

    > Traceback (most recent call last):
    > File "<stdin>", line 1, in ?
    > File "DCOracle2/__init__.py", line 37, in ?
    > from DCOracle2 import *
    > File "DCOracle2/DCOracle2.py", line 104, in ?
    > import dco2
    > ImportError: dlopen: DCOracle2/dco2.so: symbol "OCILobIsTemporary"
    > unresolved
    >


    I actually can get past this now using libocijdbc8 but now I get:
    >>> import DCOracle2

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "DCOracle2/__init__.py", line 91, in ?
    import DA
    File "DCOracle2/DA.py", line 90, in ?
    from db import DB
    File "DCOracle2/db.py", line 89, in ?
    import DCOracle2, DateTime
    ImportError: No module named DateTime


    How many other non-standard modules do I need to install to get
    DCOracle2 working in a non-zope vanilla environment?
     
    the_rev_dharma_roadkill, Jul 17, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kelly Carrigan

    Connecting Python to Oracle9i on AIX 5.1

    Kelly Carrigan, Oct 20, 2003, in forum: Python
    Replies:
    0
    Views:
    382
    Kelly Carrigan
    Oct 20, 2003
  2. Srinath Avadhanula
    Replies:
    0
    Views:
    920
    Srinath Avadhanula
    Oct 19, 2004
  3. John Fabiani

    connecting to Sybase/MsSQL from python

    John Fabiani, Feb 12, 2005, in forum: Python
    Replies:
    3
    Views:
    559
    Alan Kennedy
    Feb 13, 2005
  4. Chinni
    Replies:
    5
    Views:
    582
    Jhair Tocancipa Triana
    Dec 19, 2006
  5. Replies:
    2
    Views:
    282
    Real Gagnon
    Jun 13, 2007
Loading...

Share This Page