Download the gz file and extract it.
http://cx-oracle.sourceforge.net/
Switch to Oracle user as it will need Oracle libraries to perform the installation.
su - oracle
important: switch to the oracle environment you would like to install this. By doing it, . oraenv, it will locate the right Oracle Home and knowing where all the libraries reside. My instance is "orcl"
. oraenv
orcl
The installation part.
python setup.py build
pyhton setup.py install
During the cx_Oracle copying stage, it might fail to copy (cx_Oracle.so) specific libraries path to the python directories. Just perform a chmod 755 on the python package_site path with root if the python has been installed with root previously.
That's it.
There are some examples in the "samples" directory you can try it out. The DatabaseStartup.py and DatabaseShutdown.py are pretty cool.