繁体   English   中英

Python-Oracle 11g连接

[英]Python - Oracle 11g connection

我想连接python和oracle 11g。 Python版本-3.6.1 / 64位,Windows 7 -64位。

我已经从https://oracle.github.io/python-cx_Oracle/安装了cx_Oracle,代码如下-

import cx_Oracle

con = cx_Oracle.connect('sde/sde@orcl')
print (con.version)
con.close()

但我低于错误-

C:\Python\Python36\python.exe 
D:/Automation/Python_WP/practice/database/db_connection.py
Traceback (most recent call last):
File "D:/Automation/Python_WP/practice/database/db_connection.py", line 1, in <module>
import cx_Oracle
ImportError: DLL load failed: The specified module could not be found.

Process finished with exit code 1

请让我知道连接Python 3.6.1和Windows 11 64位Oracle 11g的步骤。

1. Download msvcp71.dll and msvcr71.dll from the web.
2. Save them to your C:\Windows\System32 folder.
3. Save them to your C:\Windows\SysWOW64 folder as well (if you have a 64-bit operating system).

现在,尝试在Python中运行代码文件,它将在几秒钟内加载图形。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM