python连接oracle报错dpi 1047_【转】Python访问oracle数据库,DPI-1047: Cannot locate a 64-bit Oracle Client library...

本文介绍了在Python中遇到DPI-1047错误时,如何解决无法找到64位Oracle客户端库的问题。解决方案包括安装Oracle Instant Client并配置系统环境变量,以及创建tnsnames.ora文件。通过这些步骤,作者成功连接到Oracle数据库。
摘要由CSDN通过智能技术生成

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

时间:2019-08-21

本文章向大家介绍【转】Python访问oracle数据库,DPI-1047: Cannot locate a 64-bit Oracle Client library: "The specified module could not be found",主要包括【转】Python访问oracle数据库,DPI-1047: Cannot locate a 64-bit Oracle Client library: "The specified module could not be found"使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

使用python连接Oracle,出现如下错误:

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

解决方案:

**1、**需要安装Oracle Instant Client(安装与服务器端Oracle版本相近的版本)

安装包下载地址:https://www.oracle.com/technetwork/database/database-technologies/instant-client/downloads/index.html

**2、**解压之后,配置系统环境。

这是个栗子:

解压后路径:C:\software\oracle\instantclient_12_2

将此路径添加到系统的Path中

**3、**在解压路径中添加tnsnames.ora文件,文件配置如下:

这是个栗子:

orcl =(DESCRIPTION=(ADDRESS_LIST=(ADDRESS= (PROTOCOL = TCP)(HOST = IP地址)(PORT = 1521))

)

(CONNECT_DATA=(SERVICE_NAME=服务名)

)

)

over

亲测可行,已成功!

谢谢

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值