I have a python test program to connect to oracle installed in my laptop. the python program is working fine when called from python console(IDLE) but the same program gives "ModuleNotFoundError: No module named 'cx_Oracle' " error when run from anaconda-spyder.
Please suggest.
the program is as follows:
import cx_Oracle
conn=cx_Oracle.connect('user/password@localhost/SID')
cur=conn.cursor()
cur.execute('select * from employee')
for line in cur:
print(line)
cur.close()
conn.close()
ModuleNotFoundError: No module named 'cx_Oracle'