cx oracle 提示32位,cx_Oracle ImportError: DLL load failed: %一 不是有效的 Win32 应用程序...

cx_Oracle ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。

环境:

Win7 64位

Python2.7.2 64位

Oracle client 32位

cx_Oracle: Windows amd64 Installer(Oracle 11g, Python 2.7)

在python终端报错:

>>> import cx_Oracle

Traceback (most recent call last):

File "", line 1, in

ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。

原因:

在64位系统上安装32位Oracle client,是因为要安装PLSQL Developer,但是货认不了64位的Oracle Client。所以现在导致现在的cx_Oralce认不到oci.dll的32位版本。

解决方法:

1.安装64位的oracle client

2.拷贝一个64位的 oci.dll 到%python_home%\Lib\site-packages 下

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值