我想连接python和oracle 11g。 Python版本 - 3.6.1/64位,Windows 7 -64位。Python - Oracle 11g连接
我从https://oracle.github.io/python-cx_Oracle/ 的代码安装cx_Oracle是如下 -
import cx_Oracle
con = cx_Oracle.connect('sde/[email protected]')
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-7 64位的Oracle 11g。
你用pip安装了它还是下载了它? – Exprator
我已经安装了cx_Oracle-5.3-11g.win-amd64-py3.6-2.exe(md5)。 – Kuladip
使用pip install cx_Oracle并尝试。希望它能解决这个错误 – Exprator