@[Python]
Python连接Oracle时的报错
今天在研究使用Python连接Oracle,找到了对应的范例文章:pyhton安装之cx_Oracle模块
参考步骤完成后在CSDN上用了别人的范例代码后跑不通,报错如下:
DatabaseError Traceback (most recent call last)
<ipython-input-5-c45d4d670d66> in <module>
1 import cx_Oracle
2 dir(cx_Oracle)
----> 3 conn = cx_Oracle.connect('myusername/mypassworld@10.111.1111.11:1521/SERVERNAME') #用自己的实际数据库用户名、密码、主机ip地址 替换即可
4 curs=conn.cursor()
5 sql="select * from ncas037.mars_text_import2 where agcode like '1100078__'" #sql语句
DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "D:\app\ncas041\product\11.2.0\client_1\bin\oci.dll is not the correct architecture". See https://oracle.github.io/odpi/doc/installation.html#windows for help