If you try to connect to Oracle Database 11.2 using python-oracledb's default 'Thin' mode you will get the error:
DPY-3010: connections to this database server version are not supported by python-oracledb in thin mode
How can I connect to this old version of Oracle Database?
Python-oracledb's default Thin mode can connect to Oracle Database 12.1 or later. If you want to connect to Oracle Database 11.2 you need to enable Thick mode by calling
oracledb.init_oracle_client()
in your code. See the user documentation Enabling python-oracledb Thick modeOracle DB 11.2 is very old. There are newer, free versions of Oracle Database available, such as Oracle Database 23c Free and the XE 21c "Express Edition".