Python – cx_Oracle throws missing when executed by django-chronograph

I have setup the cx_Oracle and i could query the data thru the custom django-admin command.


But when i try to schedule the custom command using django-chronograph. It throws the following error.

Traceback (most recent call last):
  File "", line 7, in ?
    import cx_Oracle
ImportError: cannot open shared object file: No such file or directory


After spending a whole afternoon checking the root cause. I found that the django-chronograph fails to read those required libs inside $ORACLE_HOME/lib. I have tried to move the $ORACLE_HOME and $LD_LIBRARY_PATH declaration from profile.d (Valid for interactive shell only) to .bashrc. But still no luck.

Finally, i have to create some symbolic links to resolve the problem.

/usr/lib64/ -> /usr/lib/oracle/11.2/client64/lib/
/usr/lib64/       -> /usr/lib/oracle/11.2/client64/lib/
/usr/lib64/   -> /usr/lib/oracle/11.2/client64/lib/
/usr/lib64/       -> /usr/lib/oracle/11.2/client64/lib/
/usr/lib64/   -> /usr/lib/oracle/11.2/client64/lib/
/usr/lib64/     -> /usr/lib/oracle/11.2/client64/lib/


Not a elegant solution. Please let me know if u have a better idea.

Done =)

Reference: [cx-oracle-users] CentOS 5, Oracle 11g RPM Binary install –


One thought on “Python – cx_Oracle throws missing when executed by django-chronograph”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.