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

后端 未结 8 1880
耶瑟儿~
耶瑟儿~ 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:48

    Tried installing it via rpm posted in above answers, but it didn't worked. What worked instead is plain pip install.

    pip install cx_oracle
    

    The above command installed cx_oracle=6.1 Please note that I'm using python 2.7.14 Anaconda release and oracle 12c.

提交回复
热议问题