cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "The specified modu

python_oracle:cx_Oracle模块


import cx_Oracle as oracle

conn = oracle.connect(‘laosnnghju/xydjAJKD123355a@...:1521/zawbsc2’)
cursor = conn.cursor()
SQL_Select = ‘select * from DIM_ZNFX_COMPANY_REL t’
cursor.execute(SQL_Select)
cursor.close()
conn.close()

1.pip install cx_Oracle
2.[安装完cx_Oracle,如图所示,验证是否安装成功,未返回任何消息,说明已经安装成功。安装完cx_Oracle,如图所示,验证是否安装成功,未返回任何消息,说明已经安装成功。
3.报如图所示错误,下载instant-client
https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.htmlcx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library:
4.解压instant-client,将其下所有dll文件复制到site-packages下面
cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library:

你可能感兴趣的:(Python自动化)