Ich habe python-2.7.amd64.msi und cx_Oracle-5.1.2-11g.win-amd64-py2.7.msi installiert.Python kann cx_Oracle nicht unter Windows 7 laden
Ich habe viel mit PATH und PYTHONPATH Umgebungsvariablen herumgestochert, aber nichts hat geholfen, das cx_Oracle Modul zu laden. Derzeit PYTHONPATH wird auf C: \ Python27 \ Lib \ site-packages
Mein überaus Basisprogramm
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()
Das Programm Ausgabe lautet:
['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.
Ich habe auch die Registry Einträge wie detailliert here
Dies funktioniert gut unter Linux, so scheint es, dass ich etwas falsch mit dem Windows-Setup habe. Aber mir sind die Ideen ausgegangen.