ei***********@yahoo.com wrote:
hi
i am writing a CGI to process some database transactions using the
Sybase module.
so in my CGI script, i have:
...
import Sybase
import cgitb; cgitb.enable(display=1 , logdir="/tmp/weblog.txt")
...
...
the problem is , everytime i have ImportError: No module named Sybase
flagged out.
at first i think it's library path misconfiguration, so i put
os.environ["SYBASE"] = '/path/to/sybase'
os.environ["LD_LIBRARY_PATH"] = '/path/to/sybase/lib'
before i import Sybase. but its still the same error
Ok.so now, is it necesary to configure the web server's "nobody" user's
profile to point to the Sybase libraries? or worse, configure root's
profile to point to Sybase libraries? what's could be wrong?
thanks for any help rendered.
You should try adding "/path/to/sybase" to sys.path as well as/rather
than putting it in an environment variable. sys.path is what the
interpreter uses to find importable modules.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC
www.holdenweb.com
PyCon TX 2006
www.python.org/pycon/