分類: Oracle2010-09-04 01:46 909人閱讀 評論(0) 收藏 舉報
環境:
Windows7
Python 2.6.2
cx_Oracle 5.0.4
Oracle Instant Client 10.2.0
a)常規方法解壓Oracle Instant Client檔案到指定目錄
b)設定環境變數
c)設定tnsnames.ora
d)pl/sql developer可以登入遠程Oracle資料庫
安裝cx_Oracle,在python裡面import cx_Oracle,提示:
>>> import cx_Oracle
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import cx_Oracle
ImportError: DLL load failed: 找不到指定的模組。
網上搜尋一番都在說複製oracle目錄的oci.dll等檔案到$python_home/Lib/site-packages即可。
反覆嘗試未果。
偶見一網文說複製oci.dll到$python_home (比如c:/python26),將信將疑操作後發現竟然可以了。
特此記錄。
環境:
Windows7
Python 2.6.2
cx_Oracle 5.0.4
Oracle Instant Client 10.2.0
a)常規方法解壓Oracle Instant Client檔案到指定目錄
b)設定環境變數
c)設定tnsnames.ora
d)pl/sql developer可以登入遠程Oracle資料庫
安裝cx_Oracle,在python裡面import cx_Oracle,提示:
>>> import cx_Oracle
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import cx_Oracle
ImportError: DLL load failed: 找不到指定的模組。
網上搜尋一番都在說複製oracle目錄的oci.dll等檔案到$python_home/Lib/site-packages即可。
反覆嘗試未果。
偶見一網文說複製oci.dll到$python_home (比如c:/python26),將信將疑操作後發現竟然可以了。
特此記錄。