您的位置:首页 > 数据库 > Oracle

[Win7]cx_Oracle 找不到指定模块错误解决

2010-08-06 15:24 453 查看
环境:

Windows7

Python 2.6.2

cx_Oracle 5.0.4

Oracle Instant Client 10.2.0

a)常规方法解压Oracle Instant Client文件到指定目录

b)设置环境变量

c)设置tnsnames.ora

d)pl/sql developer可以登录远程Oracle数据库

安装cx_Oracle,在python里面import cx_Oracle,提示:

>>> import cx_Oracle

Traceback (most recent call last):

File "<pyshell#0>", line 1, in <module>

import cx_Oracle

ImportError: DLL load failed: 找不到指定的模块。

网上搜索一番都在说复制oracle目录的oci.dll等文件到$python_home/Lib/site-packages即可。

反复尝试未果。

偶见一网文说复制oci.dll到$python_home
(比如c:/python26),将信将疑操作后发现竟然可以了。

特此记录。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐