Connecting Oracle8i to Python

  • Thread starter the_rev_dharma_roadkill
  • Start date
T

the_rev_dharma_roadkill

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 2.2.2 (#1, May 9 2003, 14:15:51) [C] on osf1V5
Type "help", "copyright", "credits" or "license" for more information.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
 
T

the_rev_dharma_roadkill

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 2.2.2 (#1, May 9 2003, 14:15:51) [C] on osf1V5
Type "help", "copyright", "credits" or "license" for more information.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: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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top