Connecting Oracle8i to Python

the_rev_dharma_roadkill doug.hendricks at tnzi.com
Fri Jul 18 01:04:22 CEST 2003


doug.hendricks at tnzi.com (the_rev_dharma_roadkill) wrote in message news:<fb91dbec.0307162129.9a32067 at posting.google.com>...
> doug.hendricks at tnzi.com (the_rev_dharma_roadkill) wrote in message news:<fb91dbec.0307161754.8a21bd0 at posting.google.com>...
> > 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?

It's working now.

I was trying to run python and import DCOracle2 while I was sitting in
the directory directly above the "build directory".  As it turns out,
this is a very bad idea.  This directory is named "DCOracle2", so
maybe python grabs this as the module directory (search current
directory before other directories) when what I wanted was the code in
the
lib/python2.2/site-packages/DCOracle2 directory.  Starting python from
any other directory, it works fine.  So as I no longer need the build
directory anymore, this should not be a problem




More information about the Python-list mailing list