Install cx_Oracle on Ubuntu

If you are still having trouble running sqlplus please refer to my previous article on how to install Oracle Client.

In order to install cx_Oracle open a Terminal and execute the following:


sudo -i

apt-get install python-pip python-dev build-essential

export ORACLE_HOME=/usr/lib/oracle/11.2/client

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME

cd $ORACLE_HOME

ln -s libclntsh.so.x.x libclntsh.so

pip install cx_Oracle

Done!