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

后端 未结 8 1865
耶瑟儿~
耶瑟儿~ 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条回答
  •  旧时难觅i
    2020-12-15 10:52

    To access Oracle from python you need (additionally) the cx_Oracle module. The module must be located either in the system python path or you have to set the PYTHONPATH appropriate.

提交回复
热议问题