64位 Python3.8 连接32位Oracle 11g时,报错信息如下:
cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library
解决方法:
- cx_Oracle和python版本对应,都是3.8;
- Python 3.8.3(64位)
- cx_Oracle-8.1.0-cp38-cp38-win_amd64.whl(64位)
- cx_Oracle和instantclient版本对应,都是11.2;
- instantclient下载地址:instantclient-basic 64位的 地址:https://www.oracle.com/technetwork/topics/winx64soft-089540.html,下载后解压到某文件夹备用D:\Notes\Python\pythonlibs\instantclient_19_9
- 不确定我的cx_Oracle是不是11.2的,但是测试下来是可以用的,instantclient的版本说明:applications using Oracle Call Interface 19 can connect to Oracle Database 11.2 or later
- cx_oracle和instantclient的版本不必和Oracle数据库(11g)