At the present date, the Db2 v11.5 fixpacks that are available do not support (in the IBM sense of that term) the 24.04 ubuntu as yet.
However , it is only a matter of time until IBM releases a version to support 24.04 .
Regardless, you can "force it" in the meantime (your mileage might vary), please check out this thread:
https://community.ibm.com/community/user/datamanagement/discussion/db2-on-linux-ubuntu-2404-lts-noble
After you get your Db2-instance running on 24.04 consider opening a different question (possibly on a different forum) for your python trouble - because we cannot tell which version(s) of python you are using, and which interface to Db2 from python that you are using (e.g. is it ibm_db, or ibm_db_sa, or ibm_db_dbi, or pyodbc ...) or which version(s) of python you are trying. If your interface uses clidriver , you should test clidriver on its own with your Db2-instance before involving python (as there may also be dependencies there, which might need workarounds that are unrelated to python per se).
There are separate forums (i.e. not on this site) for supporting python ibm_db, ibm_db_sa, ibm_db_dbi (all on github), or pyodbc etc. So choose the right forum.
------------------------------
Mike O'Reilly
------------------------------