Hi All,

In my python script i use to run some oracle queries for this i require a library to connect to oracle which is cx_Oracle.

When we were using 9i(oracle).. my script was running fine.. and now when we migrated to 10 G its giving problem...

Few lines of my script

import sys
import cx_Oracle
from datetime import date, timedelta
import mail
import time

when above code runs its throwing error as ...

import cx_Oracle
ImportError: ld.so.1: [B]python: fatal: libclntsh.so.9.0[/B]: open failed: No such fil\
e or directory

if you see above error is clearly looking old 9i library .. as of now we are in 10 g

And my question is

How do I tell Python which Oracle Home to use?

Adding to above...

newprd$ python
ActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based on
Python 2.4.3 (#1, Apr  3 2006, 18:34:02) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.

>>> import cx_Oracle
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: ld.so.1: python: fatal: libclntsh.so.9.0: open failed: No such file or directory

Perhaps you should uninstall the cx_Oracle module and reinstall it, as it probably looks for the location of the current Oracle installation during setup. Make sure all references to the old 9i version are removed, including registry entries and all directories.


You mean to say that i need to reinstall it...

But my question how we tell python to use new oracle home is there any setup file we need to edit.. so that it can look from now onwards new oracle home...

waiting for your replay