python连接oracle超时设置,Python连接Oracle设置过程记录
環境:
Python 3 64位
Oracle 12c 64位
Oracle?Instant Client 64位
Windows 10 64位
過程:
1、下載安裝Oracle instant client
解壓軟件包得到以下目錄
E:\instantclient-basic-windows.x64-12.2.0.1.0\instantclient_12_2
2、設置Windows 10的環境變量
控制面板 -> 系統 ?-> 高級系統設置 -> 環境變量 -> ?系統變量
新建ORACLE_HOME,值為E:\instantclient-basic-windows.x64-12.2.0.1.0\instantclient_12_2
新增PATH, 值為%ORACLE_HOME%
3、下載安裝Python 3
4、Python 3 安裝cx_Oracle模塊
pip install cx_Oracle
5、檢查是否安裝成功的代碼
import cx_Oracle
conn = cx_Oracle(username, password, oracle_server_ip:1521/oracle_sid)
oracle_version = conn.version
print (oracle_version)
標簽:Python,instantclient,oracle,cx,64,Oracle,連接
來源: https://blog.51cto.com/12472127/2355268
總結
以上是生活随笔為你收集整理的python连接oracle超时设置,Python连接Oracle设置过程记录的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: iPhone 15 Pro新设计颠覆:祖
- 下一篇: python中什么是实例-在Python