Address: http://blog.csdn.net/kongxx/article/details/7107683
After the cx_oracle and Oracle Instant Client packages are installed, the following problems occur when you use "Import cx_oracle" to import packages.
Importerror: libclntsh. so.10.1: cannot open shared object file: no such file or directory
In this case, Python needs to use Oracle databases when operating Oracle databases. The problem above is that the libraries required by Python are not in the Environment path, in Linux, it is not in the LD_LIBRARY_PATH environment variable. At this time, you need to add these library paths to LD_LIBRARY_PATH.
$ Whereis Oracle <br/> $ export LD_LIBRARY_PATH =$ {LD_LIBRARY_PATH}:/usr/lib/Oracle/11.2/client/libRun the test again. The problem above is gone.
References:CX-Oracle: http://cx-oracle.sourceforge.net/<br/> Instant Client: http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html <br/> using Python with Oracle Database 11G: http://www.oracle.com/technetwork/articles/dsl/python-091105.html