This article address: http://blog.csdn.net/kongxx/article/details/7107683
After installing the cx_oracle and Oracle Instant client packages, the following problems occur when importing packages using import Cx_oracle
Importerror:libclntsh.so.10.1:cannot open Shared object file:no such file or directory
This is because Python needs to use some Oracle libraries when manipulating Oracle databases, and the problem is that Python needs these libraries that are not in the path of the environment, and Linux is not in Ld_library_path environment variables, At this point, you need to add these library paths to the Ld_library_path.
$ whereis Oracle
$ export Ld_library_path=${ld_library_path}:/usr/lib/oracle/11.2/client/lib
Run the test again, the problem above is gone.
Resources:
cx-oracle:http://cx-oracle.sourceforge.net/
Instant client:http://www.oracle.com/technetwork/database/ features/instant-client/index-097480.html
Using Python with Oracle Database 11g:http://www.oracle.com/ Technetwork/articles/dsl/python-091105.html