小编use*_*926的帖子

Python cx_Oracle 客户端库无法加载

我正在尝试连接到 Oracle 数据库,但 python 脚本找不到 cx_Oracle。这是我的脚本:

import cx_Oracle
con = cx_Oracle.connect(‘DBNAME/testitout@www.xx.yy.zz:1521/yeppers’)
print(con.version)
con.close()
Run Code Online (Sandbox Code Playgroud)

这是我得到的错误:

================= RESTART: C:\Python35\Connect_To_Oracle.py =================
Traceback (most recent call last):
  File "C:\Python35\Connect_To_Oracle.py", line 1, in <module>
   import cx_Oracle
cx_Oracle.DatabaseError: DPI-1047: Oracle Client library cannot be loaded: The specified module could not be found. See https://oracle.github.io/odpi/doc/installation.html for help
Run Code Online (Sandbox Code Playgroud)

这是我的操作系统和版本信息:

  • 英特尔至强 CPU E7-4870 @ 2.40GHz
  • Windows Server 2008 R2 企业版
  • 蟒蛇 3.5

这是我为安装 cx_Oracle 所做的:

1. Download Instant Client (Basic Client) from Oracle here : http://www.oracle.com/technetwork/topics/winx64soft-089540.html .
2. Unzip. …
Run Code Online (Sandbox Code Playgroud)

python oracle

5
推荐指数
2
解决办法
3万
查看次数

标签 统计

oracle ×1

python ×1