Wits end with Python and cron
Justin Delvecchio
delvecchio at cubrc.org
Wed Sep 28 14:50:21 EDT 2005
I've researched this problem for the last few days. Say I have the
following script that I execute from cron on linux. Yes, the following
runs quite fine from the command line:
#! /bin/sh
# /u01/app/oracle/product/10.1.0/Db_1/lib
source /home/oracle/.bashrc
PYTHONPATH=/usr/lib/python2.3:/usr/lib/python2.3/site-packages:/u01/app/
oracle/product/10.1.0/Db_1/lib
LD_LIBRARY_PATH=/u01/app/oracle/product/10.1.0/Db_1/lib
PATH=${PATH}:${LD_LIBRARY_PATH}:${PYTHONPATH}
echo "Load library is"
echo ${LD_LIBRARY_PATH}
echo "The python path is"
echo ${PYTHONPATH}
echo "The path itself is"
echo ${PATH}
rm /home/oracle/.error-log
touch /home/oracle/.error-log
echo "Starting python map script"
cd /home/oracle/rods_dbf_file/
echo "changing directory"
/usr/bin/python /home/oracle/rods_dbf_file/map_unix.py
echo "python script run"
And the error I continually get is:
Traceback (most recent call last):
File "/home/oracle/rods_dbf_file/map_unix.py", line 29, in ?
import cx_Oracle
ImportError: libclntsh.so.10.1: cannot open shared object file: No such
file or directory
What is going on? I've googled this thing to death and it seems like
I've got two different solutions, PYTHONPATH and LD_LIBRARY_PATH, that
should satisfy this. /u01/app/oracle/product/10.1.0/Db_1/lib is where
the lib resides.
Justin Del Vecchio
Computer Engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20050928/3bcd0036/attachment.html>
More information about the Python-list
mailing list