到Oracle数据库的Python连接错误DPI-1047
为什么我试图连接我的oracle数据库,但我有错误。我是python的初学者,我试图在文档中找到答案,但这对我来说很难到Oracle数据库的Python连接错误DPI-1047,python,oracle,cx-oracle,Python,Oracle,Cx Oracle,为什么我试图连接我的oracle数据库,但我有错误。我是python的初学者,我试图在文档中找到答案,但这对我来说很难 Python version : Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32 Oracle version : 11.2.0.1.0 我的cod很简单: from sqlalchemy import create_engi
Python version :
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32
Oracle version :
11.2.0.1.0
我的cod很简单:
from sqlalchemy import create_engine
import cx_Oracle
engine = create_engine('oracle://user:password@ho.st.name:port/SID')
result = engine.execute('select * FROM TABLE')
结果我得到一个错误:
Exception has occurred: DatabaseError
(cx_Oracle.DatabaseError) DPI-1047: Cannot locate a 64-bit Oracle Client library: "The specified module could not be found".
看起来库没有正确安装。 参考 安装cx_Oracle
python -m pip install cx_Oracle --upgrade
Python
cx\u Oracle
库依赖于Oracle客户端库
从以下位置下载Oracle客户端库:
祝你好运 如有疑问,请阅读手册:。DPI-1047应该给您一个带有安装说明的URL。