python连接Oracle报错DPI-1047

Python 连接Oracle时提示::DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "The specified module could not be found". See https://oracle.github.io/odpi/doc/installation.html#windows for help
0
根据错误提示进入https://oracle.github.io/odpi/doc/installation.html#windows,下载对应的 instant client 包,然后解压配置环境变量,再次运行,一般情况下可以运行成功,解决该问题。
 
如果还是提示 DPI-104 错误,则需要检查 VC++ 是否安装。检查方法是运行下载的 instant client 目录下的 genezi.exe 程序。例如:C:\oracle\instantclient_21_3\genezi.exe,如果执行时出错则说明 vc_redist 没有正确安装。重新进入https://oracle.github.io/odpi/doc/installation.html#windows 页面,根据对应的 Oracle 版本下载对应的 vc_redist.exe 版本。
0
下载后安装即可解决问题。
posted @ 2021-12-28 13:36  Tynam.Yang  阅读(174)  评论(0编辑  收藏  举报