Using cx_Oracle to fetch tables with ROWID ends up crashing the python. I read that the solution was to set the environemtn variable 'ORA_OCI_NO_OPTIMIZED_FETCH' to 1. But using os.environ (in python) or Get-ChildItem Env: (in powershell), I don't see this particular variable. Then what should I do?
Then what should I do?

Create it. $env:ORA_OCI_NO_OPTIMIZED_FETCH = 1 in PowerShell, just before you run Python in the same shell.
How to set the environment " ORA_OCI_NO_OPTIMIZED_FETCH"?