Python: import cx_Oracle ImportError: No module named cx_Oracle error is thown

后端 未结 8 1868
耶瑟儿~
耶瑟儿~ 2020-12-15 10:33

I try to write a script in .py for oracle connectivity:

#!/usr/bin/python

import cx_Oracle

connstr=\'username/pwd@database\'
conn = cx_Oracle.connect(conns         


        
8条回答
  •  清歌不尽
    2020-12-15 10:55

    Unknown92 answer helped me (on windows). Note that all versions must fit.

    I've downloaded cx_Oracle here, for me the file cx_Oracle-5.2.1-12c.win-amd64-py3.5.exe worked with:

    • Python 3.5.1 64bit. for some reason the default download link from the main page is for the 32bit version.
    • And oracle instance client 12.1.0.2.0 (the file named instantclient-basic-windows.x64-12.1.0.2.0.zip) here.

提交回复
热议问题