第八篇:cx_Oracle出现的问题

1、cx_Oracle.DatabaseError: ORA-24315: illegal attribute type

2、cx_Oracle.InterfaceError: Unable to acquire Oracle environment handle

Python通过cx_Oracle模块连接oracle数据库报如上错误,都是应为oracle客户端的问题导致,只需要将对应版本的*.dll(10g:oci.dll, oraociei10.dll, oraocci10.dll;11g:oci.dll, oraociei11.dll, oraocci11.dll)文件拷贝至

C:\Users\Administrator\AppData\Local\Programs\Python\Python36\Lib\site-packages下或者C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\Lib\site-packages下

即可解决。

注:cx_oracle下载地址:https://pypi.python.org/pypi/cx_Oracle/5.3

       oracle客户端下载地址:https://www.oracle.com/database/technologies/instant-client/downloads.html

 

参考:https://www.cnblogs.com/lansan0701/p/8039332.html

posted @ 2019-06-25 23:14  FelixApff  阅读(1453)  评论(0编辑  收藏  举报