How to Solve NameError: name 'cx_Oracle' is not defined

Solution: Import the 'cx_Oracle' module

To Solve the error, add the following line to the top of your code.

import cx_Oracle

 

For more information:
Python cx_Oracle