cx

cx,第1张

创建于:2022.04.27
修改于:2022.04.27

文章目录
    • 1、安装vs2010
    • 2、安装dll
    • 3、设置系统变量
    • 4、如何查看python是32bit还是64bit

python后端远程连接 Oracle12.2.0.1 标准版。报出如下错误。

cx_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

1、安装vs2010

查了查信息,我的widonws是64bit,python是64bit。
查看网页,提示需要安装VS2010,安装vs2010
https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170#bookmark-vs2010
下载
Visual Studio 2010 (VC++ 10.0) SP1 (no longer supported)
vcredist_x64.exe(约10M),点击安装。

2、安装dll

cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "The specified modu

下载instant-client
https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html

官网需要注册,才能下载。
百度搜索instantclient-basic-windows.x64-12.2.0.1.0.zip
在这个网站可以下载到:http://www.itmop.com/downinfo/283441.html

解压instant-client,将其下所有dll文件复制到site-packages下面.
有人留言说:仅使用64位的 oci.dll、oraociei11.dll、oraocci11.dll 这三个 dll 就可以。
到这一步还没解决我的问题。

3、设置系统变量
  • (1)增加用户变量
    变量名:TNS_ADMIN
    变量值:C:\ProgramData\Anaconda3\instantclient_12_2

    -(2) 用户变量 path
    Path变量增加
    C:\ProgramData\Anaconda3\instantclient_12_2

-(3)系统变量 path
path变量增
C:\ProgramData\Anaconda3\instantclient_12_2

python cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library
python读取oracle数据

4、如何查看python是32bit还是64bit

在终端键入python就可以了;或者启动pycharm python console。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/langs/786627.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-05
下一篇2022-05-05

发表评论

登录后才能评论

评论列表(0条)

    保存