problem getting started with pyDB2

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jimburton

    #1

    problem getting started with pyDB2

    Hi, I'm using python 2.4, DB2 8.1 (with development libraries) on
    ubuntu linux 5.10. I installed PyDB2 1.1 but when I try to connect to
    any database I've got this:
    [color=blue][color=green][color=darkred]
    >>> import DB2
    >>> conn = DB2.connect(dsn ='sample', uid='db2inst1', pwd='secret')[/color][/color][/color]
    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "/usr/lib/python2.4/site-packages/DB2.py", line 271, in __init__
    self._db = _db2.connect(*a rgs, **kwargs)
    _db2.DatabaseEr ror: ('I', -1, 'Invalid Handle')[color=blue][color=green][color=darkred]
    >>>[/color][/color][/color]

    After installing pydb2 I got errors about the missing file libdb2.so.1
    so I copied this file from /opt/IBM/db2/V8.1/lib into /usr/lib - am I
    now missing other libs? If so how do I let python know about the db2
    libs?

    Thanks!

Working...