Step 1:install Oracle Client Library
Url:http://www.oracle.com/technetwork/topics/linuxsoft-082809.html
or search:instant clients download for Linux x86
Download:instantclient-basic-linux-version.zip # Choose your version!!!!
Instantclient-sdk-linux-version.zip # header files to compile Cx_oracle
Unzip them to one directory
Step 2:config enviroment Variables
Export Oracle_home=/path/to/instantclient # must
Config Ld_library_path (I used it but failed, so I edit file/etc/ld.so.conf)
After edit ld.so.conf file, you need run ldconfig (as root)
Step 3:install cx_oracle
Prepare:python.h
Yum Install Python-devel or apt-get install Python-dev
Cause "/usr/bin/ld:cannot find-lclntsh", you need does this
CD $ORACLE _home
Ln-s libclntsh.so.version libclntsh.so # repalce version to right num
Now you can does this:
Pip Install Cx_oracle
Good Luck