环境:django 1.8.7,python 2.7,cx_Oracle 6.1 ,oracle 11.2

最近在liunx服务器上安装了cx_Oracle,默认给我装了6.1版本,结果测试起来各种异常,先是单独写个py文件测试连接oracle,报
cx_Oracle.DatabaseError: DPI-1047: 64-bit Oracle Client library cannot be loaded: "libclntsh.so: cannot open shared object file: No such file or directory". See https://oracle.github.io/odpi/doc/installation.html#linux for help

 这个是由于没安装oracle客户端引起,下个oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm安装,修改环境变量解决,百度也有各种例子,不细说

 然后整合django去操作oracle库,报
 cx_Oracle.Cursor  no attribute 'numbersAsStrings'
 国内碰到的人少,只能google去了,看到一句
 The cursor attribute

numbersAsStrings
is deprecated and will be removed in cx_Oracle 6. An output type handler should be used instead.

意思是cx_Oracle 6.0中删除numbersAsStrings方法,既然6.0删除了,那我降级试试呢?于是
pip uninstall cx-oracle
pip install cx-oracle==5.2
问题解决