用python3链接oracle产生错误:

DPI-1047: Cannot locate a 64-bit Oracle Client library: "The specified module could not be found

主要是 instantclient版本为32位,需更换成64位。

解决方案:

一、已安装oracle客户端

1. 重新下载 instantclient 64位, 下载链接:http://jvniu.jb51.net:81/201708/tools/instantclientx64_jb51.rar

      下载完成后,解压得到 文件夹

 

2   将整个文件夹移动到oracle安装目录,client子文件夹内

 python 链接数据库错误

 

3.  添加环境变量(下图为win10系统)

 python 链接数据库错误

 

4.   重启python, 成功连接oracle。

 

二、未安装oracle客户端(需要连接服务器数据库的情况)

1、创建文件路径:

D:\Oracle11g\product\11.2.0

2、下载 instantclient 64位  放置到 1 创建的路径下

3、将文件中后缀为 dll 的文件复制到 anaconda 安装位置

 

 python 链接数据库错误

python 链接数据库错误

 

3. 、添加环境变量(见第一种情况)

4、重启python

 

 


参考:https://blog.csdn.net/guimaxingmc/article/details/80360840

相关文章:

  • 2021-10-06
  • 2021-11-02
  • 2021-12-27
  • 2022-02-11
  • 2022-12-23
  • 2021-08-28
  • 2021-11-21
猜你喜欢
  • 2022-01-01
  • 2021-09-18
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2021-11-26
相关资源
相似解决方案