python-2.7.amd64.msiとcx_Oracle-5.1.2-11g.win-amd64-py2.7.msiがインストールされています。PythonはWindows 7でcx_Oracleをロードできません
私はPATH環境変数とPYTHONPATH環境変数で多くを突き刺しましたが、cx_Oracleモジュールの読み込みに何も役立たなかった。プログラムの出力は
import sys
print sys.path
import cx_Oracle
conn_str = u'xxx/[email protected]/XXX'
conn = cx_Oracle.connect(conn_str)
c = conn.cursor()
c.execute(u'select * from table')
conn.close()
です\ Python27 \ Libの\のsite-packages
私の非常に基本的なプログラムがされています:現在PYTHONPATHが Cに設定されている
['C:\\Users\\terry\\IdeaProjects\\PythonScripts', 'C:\\Python27\\Lib\\site-packages', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27']
Traceback (most recent call last):
File "OracleTest.py", line 4, in <module>
import cx_Oracle
ImportError: DLL load failed: The specified module could not be found.
は、私はまた、レジストリを追加しました詳細のエントリhere
これはLinux上で問題なく動作しますので、私はWindowsのセットアップに何か問題があるようです。しかし、私はかなりのアイディアを使い果たしてしまった。