【转】Python访问oracle数据库,DPI-1047: Cannot locate a 64-bit Oracle Client library: "The specified module c

 

使用python链接Oracle,出现以下错误:html

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

 

解决方案:
**一、**须要安装Oracle Instant Client(安装与服务器端Oracle版本相近的版本)
安装包下载地址:https://www.oracle.com/technetwork/database/database-technologies/instant-client/downloads/index.html
**二、**解压以后,配置系统环境。
这是个栗子:
解压后路径:C:\software\oracle\instantclient_12_2
将此路径添加到系统的Path中
**三、**在解压路径中添加tnsnames.ora文件,文件配置以下:
这是个栗子:

python

orcl =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = IP地址)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = 服务名)
    )
  )

overgit

 

转自:https://blog.csdn.net/u014487025/article/details/88538217github

 

亲测可行,已成功!windows

 

谢谢服务器

相关文章
相关标签/搜索